-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFDIV-4420 - Invite citizen when solicitor stops representation #4251
base: NFDIV-4355-backend
Are you sure you want to change the base?
NFDIV-4420 - Invite citizen when solicitor stops representation #4251
Conversation
notificationDispatcher.sendNOC(nocSolRemovedSelfNotifications, details.getData(), | ||
beforeDetails.getData(), details.getId(), wasRepresentingApplicant1, NoticeType.ORG_REMOVED); | ||
|
||
if (data.getApplicationType() == ApplicationType.SOLE_APPLICATION) { | ||
final var applicant = wasRepresentingApplicant1 ? data.getApplicant1() : data.getApplicant2(); | ||
generateCaseInvite(data, wasRepresentingApplicant1, applicant); | ||
notificationDispatcher.sendNOCCaseInvite(nocSolRemovedSelfNotifications, details.getData(), details.getId(), | ||
wasRepresentingApplicant1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken, across the NoC events (caseworkerNoticeOfChange, solicitorStopRepresentingClient), we send the case invite whenever the notice type is ORG_REMOVED
and the application type is sole
. As most of the logic for NoC notifications is in sendNOC
, I'm thinking about whether it would be beneficial to remove sendNOCCaseInvite
and move the logic for the case invite notification into the sendNOC
method, allowing us consolidate the notification logic into 1 method and remove duplication from the NoC events?
notificationDispatcher.sendNOC(nocSolRemovedSelfNotifications, details.getData(), | |
beforeDetails.getData(), details.getId(), wasRepresentingApplicant1, NoticeType.ORG_REMOVED); | |
if (data.getApplicationType() == ApplicationType.SOLE_APPLICATION) { | |
final var applicant = wasRepresentingApplicant1 ? data.getApplicant1() : data.getApplicant2(); | |
generateCaseInvite(data, wasRepresentingApplicant1, applicant); | |
notificationDispatcher.sendNOCCaseInvite(nocSolRemovedSelfNotifications, details.getData(), details.getId(), | |
wasRepresentingApplicant1); | |
} | |
notificationDispatcher.sendNOC(nocSolRemovedSelfNotifications, details.getData(), | |
beforeDetails.getData(), details.getId(), wasRepresentingApplicant1, NoticeType.ORG_REMOVED); |
Plan Result (aat)
|
Plan Result (prod)
|
Change description
When a solicitor has stopped representation (NFDIV-4234), then system must invite the citizen to the case by sending them letter and an email (if email address available). This is only for SOLE cases. Changes for NFDIV-4234 has been included in this PR to build this PR. on top of NFDIV-4355.
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/NFDIV-4420