Actions
Task #3082
closedNotification for new contracts - send even for more days back (improve the queue)
Start date:
03/22/2022
Due date:
% Done:
100%
Estimated time:
Owner:
Description
We want to improve the notification - the start of identity's contract (ContractStartNotificationTask, https://wiki.czechidm.com/tutorial/adm/notification_-_identity_s_contract_is_starting) so that the number of days before/after start will be handled as "equals or before", and so it will not skip any valid contract. Example use case:
- The notification is set to "number of days before start" = 3 and runs every day after HR synchronization
- Contract A starts on 1.4. and it exists in IdM for several weeks.
- Contract B starts on 1.4., but it's created in IdM on 31.3.
- Contract C starts on 1.4., but it's created in IdM on 2.4.
All three contracts comply with the additional filters of the notification since their beginning. - Contract D starts on 1.4., it exists in IdM long before that, but it complies with the additional filter later (e.g.: System=AD and the AD account for the user is not created until 5.4.)
- The notification is sent only for the contract A on 29.3.
- The contract is in the queue of the LRT only once; it's deleted during the run of the LRT the next day.
- The notification is sent for all 4 contracts once: A on 29.3., for all the others as soon as possible (= B: 31.3., C: 2.4., D: 5.4.)
- Note: this means that the first run of the LRT will process all valid contracts - the administrator must be careful
- The queue of LRT contains all 4 contracts with the date when the notification was sent.
- Only if the contract ends (valid till < now), remove it from the queue. So if the contract was restarted in the future, the notification would be sent again for this contract.
Related issues
Updated by Roman Kučera over 2 years ago
- Status changed from New to In Progress
- Assignee set to Roman Kučera
- % Done changed from 0 to 40
Updated by Roman Kučera over 2 years ago
- % Done changed from 40 to 80
Implemented in https://github.com/bcvsolutions/czechidm-extras/tree/kucerar/3082-conctract-start-lrt-improvments
I tested this use cases and it look ok to me.
Test are passing still to.
- The notification is sent for all 4 contracts once: A on 29.3., for all the others as soon as possible (= B: 31.3., C: 2.4., D: 5.4.)
Tested all cases and it's seems ok now
- Note: this means that the first run of the LRT will process all valid contracts - the administrator must be careful
- The queue of LRT contains all 4 contracts with the date when the notification was sent.
The queue contains processed items with date when they were processed
- Only if the contract ends (valid till < now), remove it from the queue. So if the contract was restarted in the future, the notification would be sent again for this contract.
I tested this behavior and items are not deleted after another run of LRT
Updated by Tomáš Doischer over 2 years ago
LGTM! I tested all those scenarios and it works well.
Just update the documentation and add information about the first run of the task which will process all valid contracts. Maybe add it to the task description as well.
Updated by Roman Kučera over 2 years ago
- % Done changed from 80 to 90
Thanks, documentation was improved https://wiki.czechidm.com/tutorial/adm/notification_-_identity_s_contract_is_starting#notes
Updated by Roman Kučera over 2 years ago
- Status changed from In Progress to Resolved
Updated by Peter Štrunc over 2 years ago
- Status changed from Resolved to Closed
- % Done changed from 90 to 100
Updated by Alena Peterová about 2 years ago
- Related to Defect #3198: Notification for new contracts isn't sent for some contracts added
Actions