Task #2236
closedImportAutomaticRoleAttributesFromCSVExecutor finds attribute only by code
100%
Description
This task imports automatic roles by EAV attributes of contract. The issue is that it doesn't check that the attribute is from a contract definition and only uses code to find the attribute. Code is unique only within one definition...
If you have attributes with the same code within multiple definitions, this task can potentially fail. Check for definition type is needed.
Updated by Tomáš Doischer over 4 years ago
- Status changed from New to Needs feedback
- Assignee changed from Tomáš Doischer to Peter Štrunc
- Target version set to 1.9.0
- % Done changed from 0 to 80
I fixed the issue mentioned in the ticket. I also improved logging of failed imports (when the role is not found) - before, this was only logged in Tomcat, not in IdM itself which made it difficult to know whether the import went well or not. I also added a boolean option to use role codes - before, the task replaced all spaces by underscores, I've made the transformation optional. This option allows the user to have spaces in role codes.
I updated and generally tried to improve the tutorial: https://wiki.czechidm.com/tutorial/adm/automatic_role_definitions_-_import_of_data_from_csv
I didn't write any new tests since the changes were quite minor - but if deemed necessary I will write them.
@sourek, can you please do a code review when you have a minute? Thank you!
Updated by Peter Štrunc over 4 years ago
- Status changed from Needs feedback to Closed
- % Done changed from 80 to 100
Review OK. Thank you for this fix. I merged it to RC branch.