Project

General

Profile

Actions

Task #2223

closed

Notification of the guarantee end contract

Added by Marek Klement about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Marek Klement
Target version:
Start date:
04/21/2020
Due date:
% Done:

100%

Estimated time:
Owner:

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

Related to extras - Task #2224: Notification of the guarantee end contractRejectedMarek Klement04/21/2020

Actions
Actions #2

Updated by Marek Klement about 4 years ago

  • Related to Task #2224: Notification of the guarantee end contract added
Actions #3

Updated by Marek Klement about 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)

Actions #4

Updated by Roman Kučera almost 4 years ago

  • 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.

Actions #5

Updated by Marek Klement almost 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?

Actions #6

Updated by Marek Klement almost 4 years ago

There is one new change - technical identity is now found by the assigned role.

Actions #7

Updated by Marek Klement almost 4 years ago

New template for technical and admin identities was created. Functionality was tested. Now comes the adjustment of tests and documentation.

Actions #8

Updated by Marek Klement almost 4 years ago

All is updated - tests, documentation.
Changed: role select for technical identities added, a new template created

Can you please test it?

Actions #9

Updated by Roman Kučera over 3 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.

Actions #10

Updated by Marek Klement over 3 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 ?

Actions #11

Updated by Roman Kučera over 3 years ago

  • Assignee changed from Roman Kučera to Marek Klement

Thx, looks good to me now.

Actions #12

Updated by Marek Klement over 3 years ago

  • Status changed from Needs feedback to In Progress
  • % Done changed from 90 to 100
Actions #13

Updated by Peter Štrunc over 3 years ago

  • Status changed from In Progress to Closed

Merged to RC branch. Closing ticket

Actions

Also available in: Atom PDF