Task #2390
closedImprove ImportAutomaticRoleAttributesFromCSVExecutor for importing automatic roles by user attributes, eav and by contract attributes, eav
100%
Description
Now you can only import automatic roles definition by one or two contract EAV and that is not enough.
Implement new options into task:- create definition by identity attribute
- create definition by identity eav attribute
- create definition by contract attribute
- create definition by contract eav attribute
number of attributes and eav attributes must be dynamic.
Dynamic number of EAV attributes is used in https://github.com/bcvsolutions/czechidm-extras/blob/40b8ea05074601d981b491c9a43cd7e78a51bbb0/Realization/backend/idm-extras/src/main/java/eu/bcvsolutions/idm/extras/scheduler/task/impl/ImportCodeListFromCSV.java
This task must support different types of attributes not only String.
For example define these rules:
- isPrimary = false
- contract state = empty (not out of evidence)
- some contract eav = some string value
- some identity eav = some string value
Updated by Roman Kučera over 4 years ago
cherry-picked commits from #2379
Git branch - https://github.com/bcvsolutions/czechidm-extras/tree/2390-improve-auto-role-import
Updated by Peter Štrunc over 4 years ago
Thanks for this feature. Please change the behavior for error handling. Currently it is being just logged and we can end up with incomplete auto role after import. I haven't found any issue besides this.
Updated by Roman Kučera over 4 years ago
I added better handling of error, when some rule can't be created. https://github.com/bcvsolutions/czechidm-extras/commit/7ba4ec6f102a2294ee3792ebddaf1f2d0b4654f6
Because item logging is possible only if you have saved DTO, LRT create auto role definition even if the definition is without rules. But you will see that some items were not executed in LRT log. You will see definition ID and the error message. So you will be informed that something happened.
@sourek can you check the changes please?
Updated by Roman Kučera over 4 years ago
Made another small fix after discussion https://github.com/bcvsolutions/czechidm-extras/commit/9d162b2f6a2b900dc719c9d3253271f5dad54c9f
Now you will see all errors of the same type. E.g if you want to import 3 identity EAV rules and all of them has some error you will see all of them in item log. Previously you just saw the first one.
Other benefit is if first rule of the same type fail the other ones can be imported successfully.
@sourek please can you check it?
Updated by Peter Štrunc over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
Looks great, thank you. I merged it to 1.9.0-RC