Task #2237
closedExtend ImportRolesFromCSVExecutor with guarante-type
100%
Description
In an issue #2148 a guarante-type was added to a role guarantor configuration. Please extend this import task with a possibility to set guarante-type of both identitiy guarantor and role guarantor.
Related issues
Updated by Tomáš Doischer almost 4 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
After discussion with @kotynekv, I will add two new column for guarante-type, one for identity guarantes, one for role guarantes. In the task itself, I will check if the value is present in the code list guarantee-type. If not, I will import the role with the guarante but the result will be in yellow and in the detail I will say that the value was not found.
I will implement this both for creating and updating roles.
Updated by Tomáš Doischer almost 4 years ago
- Status changed from In Progress to Needs feedback
- Target version set to 2.2.0
- % Done changed from 10 to 80
I implemented the requiered new functionality (with tests), the code is in branch: https://github.com/bcvsolutions/czechidm-extras/tree/tdoischer/2237-add-guarantor-type-to-role-import-task
I also updated the documentation: https://wiki.czechidm.com/tutorial/adm/roles_-_import_data_from_csv
It's ready for code review.
Updated by Peter Štrunc almost 4 years ago
- Status changed from Needs feedback to In Progress
I looked at it and it works great. I have some minor issues though:
- Some of the methods in the ImportRolesFromCSVExecutor are becoming a tad complex to read. For example i think setGuarantees should be refactored so that it will get rid of those nested if/else blocks. Class CsvToIdm and its method parseCSV in particular is really long. I know that you are not the author of this code, but do not be afraid to refactor that code a bit, because over time it will become unbearably difficult to maintain, if we will keep adding stuff to it.
- There is a lot of issues in Sonar analysis of ImportRolesFromCSVExecutor. Again, i know that most of these are not yours, but i would love for each of us to fix few of these issues here and there so it would become clean eventually :)
Other than that i have no more "complaints" so please clean up that code a little and create merge request.
Updated by Peter Štrunc almost 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
I created new ticket, which will deal with refactoring and sonar issues https://redmine.czechidm.com/issues/2274. Closing this one.
Updated by Peter Štrunc almost 4 years ago
- Related to Task #2274: Refactor ImportRolesFromCSVExecutor and CSVToIdM added