Project

General

Profile

Actions

Task #2390

closed

Improve ImportAutomaticRoleAttributesFromCSVExecutor for importing automatic roles by user attributes, eav and by contract attributes, eav

Added by Roman Kučera almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roman Kučera
Target version:
Start date:
07/15/2020
Due date:
% Done:

100%

Estimated time:
Owner:

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

Also you should be able to create definition with multiple rules. E.g definition by identity attribute and for example contract EAV
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
Actions #1

Updated by Roman Kučera almost 4 years ago

Actions #2

Updated by Peter Štrunc over 3 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.

Actions #3

Updated by Roman Kučera over 3 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?

Actions #4

Updated by Roman Kučera over 3 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?

Actions #5

Updated by Peter Štrunc over 3 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

Actions

Also available in: Atom PDF