Task #2223
closed
Notification of the guarantee end contract
Added by Marek Klement over 4 years ago.
Updated over 4 years ago.
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 to Task #2224: Notification of the guarantee end contract added
- Status changed from In Progress to Needs feedback
- Assignee changed from Marek Klement to Alena Peterová
- Assignee changed from Alena Peterová to Roman Kučera
- % Done changed from 0 to 90
I did code review:
- 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.
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?
There is one new change - technical identity is now found by the assigned role.
New template for technical and admin identities was created. Functionality was tested. Now comes the adjustment of tests and documentation.
All is updated - tests, documentation.
Changed: role select for technical identities added, a new template created
Can you please test it?
- 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.
- 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 ?
- Assignee changed from Roman Kučera to Marek Klement
Thx, looks good to me now.
- Status changed from Needs feedback to In Progress
- % Done changed from 90 to 100
- Status changed from In Progress to Closed
Merged to RC branch. Closing ticket
Also available in: Atom
PDF