Project

General

Profile

Actions

Task #633

closed

Automatic role - skip contracts valid in the past

Added by Radek Tomiška over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Roles
Target version:
Start date:
08/08/2017
Due date:
% Done:

100%

Estimated time:
1.00 h
Owner:

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.

Actions #1

Updated by Radek Tomiška over 6 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?

Actions #2

Updated by Jan Helbich over 6 years ago

I suggest we refactor EntityUtils#isValidInFuture and #isValidNowOrInFuture to ValidableEntity or vice-versa. No need to do it now, though.

Actions #3

Updated by Radek Tomiška over 6 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.

Actions #4

Updated by Ondřej Kopr over 6 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.

Actions #5

Updated by Radek Tomiška over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF