Skip to content

Commit

Permalink
CIV-13431 Delete scenarios for CARM notifications & CIV-13490 and civ…
Browse files Browse the repository at this point in the history
…-13491 intermediate DQs (#4696)

* CIV-13431 Delete scenarios for CARM notifications

* fix notification name

* check only app represented for email successful mediation email logic

* CIV-13490 and civ-13491 intermediate DQs (#4685)

* update responseClaimTrack allocation in RespondToDefenceSpecCallbackHandler

---------

Co-authored-by: Madhan Mahadevan <[email protected]>
Co-authored-by: Sherlyn Khaw <[email protected]>

---------

Co-authored-by: Madhan Mahadevan <[email protected]>
Co-authored-by: sherlynkhaw <[email protected]>
Co-authored-by: drummondjm <[email protected]>
  • Loading branch information
4 people committed May 15, 2024
1 parent 0c65f10 commit 8326948
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ private CallbackResponse notifyApplicant(CallbackParams callbackParams) {
String claimId = caseData.getLegacyCaseReference();
String referenceTemplate = String.format(REFERENCE_TEMPLATE, claimId);
MultiPartyScenario scenario = getMultiPartyScenario(caseData);
if (caseData.isLipvLipOneVOne()) {
if (Objects.nonNull(caseData.getApplicant1Represented())
&& caseData.isApplicant1NotRepresented()
&& featureToggleService.isLipVLipEnabled()) {
sendEmail(
caseData.getApplicant1().getPartyEmail(),
notificationsProperties.getNotifyLipSuccessfulMediation(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,8 @@ private CallbackResponse populateCaseData(CallbackParams callbackParams) {
howMuchWasPaid.ifPresent(howMuchWasPaidValue -> updatedCaseData.partAdmitPaidValuePounds(
MonetaryConversions.penniesToPounds(howMuchWasPaidValue)));

updatedCaseData.responseClaimTrack(AllocatedTrack.getAllocatedTrack(
caseData.getTotalClaimAmount(),
null,
null
updatedCaseData.responseClaimTrack(AllocatedTrack.getAllocatedTrack(caseData.getTotalClaimAmount(),
null, null, featureToggleService, caseData
).name());
}
// add direction questionaire document from system generated documents, to placeholder field for preview during event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Applicant1DQ implements DQ {

private FileDirectionsQuestionnaire applicant1DQFileDirectionsQuestionnaire;
private FixedRecoverableCosts applicant1DQFixedRecoverableCosts;
private FixedRecoverableCosts applicant1DQFixedRecoverableCostsIntermediate;
private DisclosureOfElectronicDocuments applicant1DQDisclosureOfElectronicDocuments;
private DisclosureOfNonElectronicDocuments applicant1DQDisclosureOfNonElectronicDocuments;
private DisclosureReport applicant1DQDisclosureReport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Data;
import lombok.experimental.SuperBuilder;

import uk.gov.hmcts.reform.civil.documentmanagement.model.Document;
import uk.gov.hmcts.reform.civil.enums.ComplexityBand;
import uk.gov.hmcts.reform.civil.enums.YesOrNo;

Expand All @@ -16,4 +17,6 @@ public class FixedRecoverableCosts {
private ComplexityBand band;
private YesOrNo complexityBandingAgreed;
private String reasons;
// below used in intermediate claim FRC
private Document frcSupportingDocument;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class Respondent1DQ implements DQ {

private FileDirectionsQuestionnaire respondent1DQFileDirectionsQuestionnaire;
private FixedRecoverableCosts respondent1DQFixedRecoverableCosts;
private FixedRecoverableCosts respondent1DQFixedRecoverableCostsIntermediate;
private DisclosureOfElectronicDocuments respondent1DQDisclosureOfElectronicDocuments;
private DisclosureOfNonElectronicDocuments respondent1DQDisclosureOfNonElectronicDocuments;
private DisclosureReport respondent1DQDisclosureReport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Respondent2DQ implements DQ {

private FileDirectionsQuestionnaire respondent2DQFileDirectionsQuestionnaire;
private FixedRecoverableCosts respondent2DQFixedRecoverableCosts;
private FixedRecoverableCosts respondent2DQFixedRecoverableCostsIntermediate;
private DisclosureOfElectronicDocuments respondent2DQDisclosureOfElectronicDocuments;
private DisclosureOfNonElectronicDocuments respondent2DQDisclosureOfNonElectronicDocuments;
private DisclosureReport respondent2DQDisclosureReport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ VALUES ('Scenario.AAA6.ClaimantIntent.ClaimSettledEvent.Claimant',
"Notice.AAA6.ClaimantIntent.FullAdmit.Claimant", "Notice.AAA6.ClaimantIntent.Mediation.Claimant", "Notice.AAA6.ClaimantIntent.GoToHearing.Claimant",
"Notice.AAA6.ClaimantIntent.SettlementAgreement.AcceptOrRejectDefPlan.Claimant", "Notice.AAA6.ClaimantIntent.SettlementAgreement.NoDefendantResponse.Claimant",
"Notice.AAA6.ClaimantIntent.SettlementAgreement.DefendantAccepted.Claimant", "Notice.AAA6.ClaimantIntent.SettlementAgreement.DefendantRejected.Claimant",
"Notice.AAA6.DefResponse.FullDefence.FullDispute.CARM.Claimant", "Notice.AAA6.ClaimantIntent.Mediation.CARM.Claimant", "Notice.AAA6.MediationSuccessful.CARM.Claimant",
"Notice.AAA6.MediationUnsuccessful.NOTClaimant1NonContactable.CARM.Claimant", "Notice.AAA6.MediationUnsuccessful.Claimant1NonAttendance.CARM.Claimant",
"Notice.AAA6.MediationUnsuccessful.TrackChange.CARM.Claimant",
"Notice.AAA6.ClaimantIntent.RequestedCCJ.Claimant", "Notice.AAA6.ClaimantIntent.Defendant.OrgLtdCo.Claimant", "Notice.AAA6.CP.Hearing.Scheduled", "Notice.AAA6.CP.Trial Arrangements.Required",
"Notice.AAA6.CP.Bundle.Ready", "Notice.AAA6.CP.OrderMade.Completed", "Notice.AAA6.CP.HearingDocuments.Upload", "Notice.AAA6.CP.HearingDocuments.OtherPartyUploaded", "Notice.AAA6.CP.HearingFee.Paid",
"Notice.AAA6.CP.HearingFee.Required", "Notice.AAA6.CP.HearingFee.HWF.AppliedFor", "Notice.AAA6.CP.HearingFee.HWF.Rejected", "Notice.AAA6.CP.HearingFee.HWF.PartRemission",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ VALUES ('Scenario.AAA6.ClaimantIntent.ClaimSettleEvent.Defendant',
"Notice.AAA6.CP.OrderMade.Completed",
"Notice.AAA6.CP.Bundle.Ready",
"Notice.AAA6.CP.Trial Arrangements.Finalised",
"Notice.AAA6.CP.Trial Arrangements.Required"
"Notice.AAA6.CP.Trial Arrangements.Required",
"Notice.AAA6.DefResponse.FullDefence.FullDispute.CARM.Defendant",
"Notice.AAA6.ClaimantIntent.Mediation.CARM.Defendant",
"Notice.AAA6.MediationSuccessful.CARM.Defendant",
"Notice.AAA6.MediationUnsuccessful.NOTDefendant1NonContactable.CARM.Defendant",
"Notice.AAA6.MediationUnsuccessful.Defendant1NonAttendance.CARM.Defendant",
"Notice.AAA6.MediationUnsuccessful.TrackChange.CARM.Defendant"
}',
'{"Notice.AAA6.ClaimantIntent.ClaimSettleEvent.Defendant": ["applicant1ClaimSettledDateEn", "applicant1ClaimSettledDateCy"]}');
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
*/
INSERT INTO dbs.scenario (name, notifications_to_delete, notifications_to_create)
VALUES ('Scenario.AAA6.ClaimantIntent.Mediation.CARM.Claimant',
'{"Notice.AAA6.DefResponse.Full Defence.FullDispute.SuggestedMediation.Claimant"}',
'{"Notice.AAA6.DefResponse.FullDefence.FullDispute.CARM.Claimant",
"Notice.AAA6.DefResponse.FullOrPartAdmit.PayBySetDate.Claimant",
"Notice.AAA6.DefResponse.FullOrPartAdmit.PayByInstallments.Claimant",
"Notice.AAA6.DefResponse.OrgOrLtdCompany.FullOrPartAdmit.PayBySetDate.Claimant",
"Notice.AAA6.DefResponse.OrgOrLtdCompany.FullOrPartAdmit.PayByInstallments.Claimant",
"Notice.AAA6.DefResponse.PartAdmit.AlreadyPaid.Claimant",
"Notice.AAA6.DefResponse.FullDefence.AlreadyPaid.Claimant",
"Notice.AAA6.DefResponse.PartAdmit.PayImmediately.Claimant"}',
'{"Notice.AAA6.ClaimantIntent.Mediation.CARM.Claimant" : []}');

/**
Expand All @@ -23,7 +30,13 @@ VALUES ('Notice.AAA6.ClaimantIntent.Mediation.CARM.Claimant',
*/
INSERT INTO dbs.scenario (name, notifications_to_delete, notifications_to_create)
VALUES ('Scenario.AAA6.ClaimantIntent.Mediation.CARM.Defendant',
'{"Notice.AAA6.DefResponse.Full Defence.FullDispute.SuggestedMediation.Claimant"}',
'{"Notice.AAA6.DefResponse.FullDefence.FullDispute.CARM.Defendant",
"Notice.AAA6.DefResponse.FullOrPartAdmit.PayBySetDate.Defendant",
"Notice.AAA6.DefResponse.FullOrPartAdmit.PayByInstallments.Defendant",
"Notice.AAA6.DefResponse.OrgOrLtdCompany.FullOrPartAdmit.PayBySetDate.Defendant",
"Notice.AAA6.DefResponse.OrgOrLtdCompany.FullOrPartAdmit.PayByInstallments.Defendant",
"Notice.AAA6.DefResponse.FullDefenceOrPartAdmin.AlreadyPaid.Defendant",
"Notice.AAA6.DefResponse.FullOrPartAdmit.PayImmediately.Defendant"}',
'{"Notice.AAA6.ClaimantIntent.Mediation.CARM.Defendant" : []}');

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ void shouldNotifyClaimantCarmLRVLipNotifyApplicant_whenInvoked() {
void shouldNotifyClaimantCarmLipVLipNotifyApplicant_whenInvoked() {
//Given
when(featureToggleService.isCarmEnabledForCase(any())).thenReturn(true);
when(featureToggleService.isLipVLipEnabled()).thenReturn(true);
CaseData caseData = CaseDataBuilder.builder().atStateClaimIssued1v1LiP()
.applicant1Represented(NO)
.setClaimTypeToSpecClaim()
Expand Down

0 comments on commit 8326948

Please sign in to comment.