Skip to content
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

CIV-10907 - Claimant LiP notification at Hearing Scheduled #3371

Merged
merged 19 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cc666d3
CIV-10907 - Claimant LiP notification at Hearing Scheduled
m-meulendijks-v1 Oct 9, 2023
0ee4f6f
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Oct 9, 2023
1719f23
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Oct 10, 2023
0002a22
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Oct 31, 2023
36305ea
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Nov 3, 2023
a5b3924
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Nov 14, 2023
7127a16
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Nov 17, 2023
41afd07
CIV-10370 Add SDO claimant lip Notification
miguelMolina3691 Oct 6, 2023
7528ee0
CIV-10370 update test
miguelMolina3691 Oct 10, 2023
a0397ac
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Nov 20, 2023
524cfaa
CIV-10907 - worked around feature toggle for early adopters
m-meulendijks-v1 Nov 20, 2023
8af5a7e
Merge branch 'master' into feat/CIV-10907
marianadpereira Nov 20, 2023
bbacb15
Merge branch 'master' into feat/CIV-10907
m-meulendijks-v1 Nov 21, 2023
7c08ec6
Merge branch 'master' into feat/CIV-10907
dharmendrak Nov 21, 2023
cfe996c
Merge branch 'master' into feat/CIV-10907
marianadpereira Nov 22, 2023
9c99cad
Merge branch 'master' into feat/CIV-10907
laarmada Nov 30, 2023
40909ff
Merge branch 'master' into feat/CIV-10907
marianadpereira Dec 1, 2023
5c62fed
Merge branch 'master' into feat/CIV-10907
marianadpereira Dec 1, 2023
3b3231e
Merge branch 'master' into feat/CIV-10907
marianadpereira Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ public String camundaActivityId(CallbackParams callbackParams) {
private CallbackResponse notifyClaimantHearing(CallbackParams callbackParams) {
CaseData caseData = callbackParams.getCaseData();
boolean isApplicantLip = isApplicantLip(caseData);
String recipient = caseData.getApplicantSolicitor1UserDetails().getEmail();

if (isEvent(callbackParams, NOTIFY_CLAIMANT_HEARING_HMC)) {
String recipient = caseData.getApplicantSolicitor1UserDetails().getEmail();
sendEmailHMC(caseData, recipient);
} else if (isEvent(callbackParams, NOTIFY_CLAIMANT_HEARING)) {
sendEmail(caseData, getRecipient(caseData, isApplicantLip), getReferenceTemplate(caseData, isApplicantLip), isApplicantLip);
Expand Down Expand Up @@ -142,7 +142,7 @@ private boolean isApplicantLip(CaseData caseData) {
}

private String getRecipient(CaseData caseData, boolean isApplicantLip) {
return isApplicantLip ? caseData.getApplicant1().getPartyEmail()
return isApplicantLip ? caseData.getClaimantUserDetails().getEmail()
: caseData.getApplicantSolicitor1UserDetails().getEmail();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ void setup() {
when(notificationsProperties.getSdoOrdered()).thenReturn("template-id");
when(notificationsProperties.getSdoOrderedSpec()).thenReturn("template-id-spec");
when(notificationsProperties.getClaimantLipClaimUpdatedTemplate()).thenReturn("template-id-lip");
when(notificationsProperties.getSdoOrderedSpec()).thenReturn("template-id-spec");
when(notificationsProperties.getSdoOrderedEA()).thenReturn("template-id-EA");
when(notificationsProperties.getSdoOrderedSpecEA()).thenReturn("template-id-spec-EA");
when(notificationsProperties.getClaimantLipClaimUpdatedTemplate()).thenReturn("template-id-lip");
when(organisationService.findOrganisationById(anyString()))
.thenReturn(Optional.of(Organisation.builder().name("Signer Name").build()));
when(featureToggleService.isEarlyAdoptersEnabled()).thenReturn(false);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ void shouldNotifyApplicantSolicitor_whenInvokedNoFeeAnd2v1() {
}

@Test
void shouldNotifyApplicantSolicitorLip_whenInvokedAnd1v1() {
void shouldNotifyApplicantLip_whenInvokedAnd1v1() {
// Given
CaseData caseData = CaseDataBuilder.builder().atStateClaimDetailsNotified().build().toBuilder()
.hearingDate(LocalDate.of(2023, 05, 17))
.hearingTimeHourMinute("1030")
.applicant1Represented(YesOrNo.NO)
.applicant1(Party.builder().partyName("John").partyEmail("[email protected]").type(Party.Type.INDIVIDUAL).build())
.claimantUserDetails(IdamUserDetails.builder().email("[email protected]").build())
.hearingReferenceNumber("000HN001")
.addApplicant2(YesOrNo.NO)
.addRespondent2(YesOrNo.NO)
Expand Down
Loading