Task #2223
closedNotification of the guarantee end contract
100%
Description
There are technical accounts that are handled as identities. Each identity has its own guarantee = the owner of the account. If the contract ends, it is needed to notify owner of the account in the day of leaving - notify holders of some role and also its guarantee.
This will be solved as LRT. Extend LastContractEndNotificationTask for filters about technical accounts.
Related issues
Updated by Marek Klement over 4 years ago
- Related to Task #2224: Notification of the guarantee end contract added
Updated by Marek Klement over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Marek Klement to Alena Peterová
Can you please make review?
Documentation: https://wiki.czechidm.com/tutorial/adm/notification_-_identity_s_last_contract_is_ending#set_up_the_long_running_task_lrt_with_technical_identities
Branch: personal/klement/2223-notification-of-guarantee-end-contract
Tests: 90% coverage of lines (IDEA testing)
Updated by Roman Kučera over 4 years ago
- Assignee changed from Alena Peterová to Roman Kučera
- % Done changed from 0 to 90
- Lines 134, 142, 156, Probably better name for this list to make the code more readable
- LastContractEndNotificationTask:getItemsToProcess 135 Better to use StringUtils.isBlank
- Methods handleTechnicalAndPrefix and handleTechnical are not useful in my opinion. I don't see any benefit when you are calling other private method and you are performing just stream.filter inside it. Why not to put this stream.filter directly in the main if:else in getItemsToProcess
- LastContractEndNotificationTask:filterOwnersOfTechnicalIdentities 218 You can use anyMatch instead for each loop, you are using streams quite a bit so I'm surprised you did't use anyMatch
Code coverage is nice.
Next I will test it.
Updated by Marek Klement over 4 years ago
Thanks for the review.
I fixed all points mentioned. Especially thank you for the method anyMatch(), it is very useful and shortens code a lot.
Can you please test it?
Updated by Marek Klement over 4 years ago
There is one new change - technical identity is now found by the assigned role.
Updated by Marek Klement over 4 years ago
New template for technical and admin identities was created. Functionality was tested. Now comes the adjustment of tests and documentation.
Updated by Marek Klement over 4 years ago
All is updated - tests, documentation.
Changed: role select for technical identities added, a new template created
Can you please test it?
Updated by Roman Kučera over 4 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Roman Kučera to Marek Klement
Thx, for the new changes.
I retest it and it works correctly.
Code looks good, but I found some small issues
- LastContractEndNotificationTask:130 you are using sendInvalid for tech role code. This doesn't have any impact on the LRT behavior if you running the task from FE, but fix it please.
- LastContractEndNotificationTask:448 you should get user from embedded attribute instead of performing DB call.
Updated by Marek Klement over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Marek Klement to Roman Kučera
Fixed minor issues after review. Can you check it please @kucerar ?
Updated by Roman Kučera over 4 years ago
- Assignee changed from Roman Kučera to Marek Klement
Thx, looks good to me now.
Updated by Marek Klement over 4 years ago
- Status changed from Needs feedback to In Progress
- % Done changed from 90 to 100
Updated by Peter Štrunc over 4 years ago
- Status changed from In Progress to Closed
Merged to RC branch. Closing ticket