Task #633
closedAutomatic role - skip contracts valid in the past
100%
Description
Automatic role is assigned to all contracts on given work position - contract validity is ignored now. When contract is valid in the future, then assigned roles are prepared correctly. When contract validity is in the past, preparing assigned roles is not needed, they will be removed right after IdentityRoleExpirationTaskExecutor is run => creating automatic roles for valid contracts in the past should be removed.
Updated by Radek Tomiška over 7 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Radek Tomiška to Ondřej Kopr
- % Done changed from 0 to 90
I've improved AddNewAutomaticRoleTaskExecutor to skip contracts valid in the past. Valid contracts or contracts valid in the future are processed now:
https://github.com/bcvsolutions/CzechIdMng/commit/0c579fc5a35fc239503f0ccb8d0bbfce40061973
https://github.com/bcvsolutions/CzechIdMng/commit/88385b9ea6fef0ae62f6abc1933218dce5ceab43
https://wiki.czechidm.com/7.3/dev/contractual-relationship#implementation_details
Could you do a feedback please?
Updated by Jan Helbich over 7 years ago
I suggest we refactor EntityUtils#isValidInFuture and #isValidNowOrInFuture to ValidableEntity or vice-versa. No need to do it now, though.
Updated by Radek Tomiška over 7 years ago
I know, you added default ValidableEntity#isValid method implementation - i've removed second implemetation and reused EntityUtils#isValid method in it. Maybe we can add another methods to ValidableEntity too, if methods will be used frequently.
Updated by Ondřej Kopr over 7 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Ondřej Kopr to Radek Tomiška
- % Done changed from 90 to 100
I did review. Automatic roles can not be assigned to past contracts - OK, thanks for this feature. It is possible to merge this branch to develop.
Updated by Radek Tomiška over 7 years ago
- Status changed from Resolved to Closed