Skip to content

Commit

Permalink
Modify mediation handler to unblock the process (#3915)
Browse files Browse the repository at this point in the history
Co-authored-by: kdaHMCTS <[email protected]>
  • Loading branch information
hmcts-version1-domini and kdaHMCTS authored Jan 31, 2024
1 parent e812469 commit 5783ea5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ public String camundaActivityId(CallbackParams callbackParams) {

private CallbackResponse notifyDefendantMediationAgreement(CallbackParams callbackParams) {
CaseData caseData = callbackParams.getCaseData();
notificationService.sendMail(
addEmail(caseData),
addTemplate(caseData),
addProperties(caseData),
String.format(REFERENCE_TEMPLATE, caseData.getLegacyCaseReference()));
if (caseData.getRespondent1().getPartyEmail() != null || caseData.getRespondentSolicitor1EmailAddress() != null) {
notificationService.sendMail(
addEmail(caseData),
addTemplate(caseData),
addProperties(caseData),
String.format(REFERENCE_TEMPLATE, caseData.getLegacyCaseReference())
);
}

return AboutToStartOrSubmitCallbackResponse.builder().build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public void handleTask(ExternalTask externalTask) {
.map(caseDetailsConverter::toCaseData)
.toList();
log.info("Job '{}' found {} case(s)", externalTask.getTopicName(), inMediationCases.size());
String[] headers = {"SITE_ID", "CASE_NUMBER", "CASE_TYPE", "AMOUNT", "PARTY_TYPE", "COMPANY_NAME",
"CONTACT_NAME", "CONTACT_NUMBER", "CHECK_LIST", "PARTY_STATUS", "CONTACT_EMAIL", "PILOT"};
String[] headers = {"SITE_ID", "CASE_TYPE", "CHECK_LIST", "PARTY_STATUS", "CASE_NUMBER", "AMOUNT", "PARTY_TYPE",
"COMPANY_NAME", "CONTACT_NAME", "CONTACT_NUMBER", "CONTACT_EMAIL", "PILOT"};
StringBuilder csvColContent = new StringBuilder();
try {
if (!inMediationCases.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ private String getCSVContent(MediationParams params) {
DefendantContactDetails defendantContactDetails = getDefendantContactDetails();
String totalClaimAmount = data.getTotalClaimAmount().toString();
String[] claimantData = {
SITE_ID, data.getLegacyCaseReference(), CASE_TYPE, totalClaimAmount,
CLAIMANT, getCsvCompanyName(data.getApplicant1()),
applicantContactDetails.getApplicantContactName(params), applicantContactDetails.getApplicantContactNumber(params),
CHECK_LIST, PARTY_STATUS, applicantContactDetails.getApplicantContactEmail(params),
SITE_ID, CASE_TYPE, CHECK_LIST, PARTY_STATUS, data.getLegacyCaseReference(), totalClaimAmount, CLAIMANT,
getCsvCompanyName(data.getApplicant1()), applicantContactDetails.getApplicantContactName(params),
applicantContactDetails.getApplicantContactNumber(params),
applicantContactDetails.getApplicantContactEmail(params),
isPilot(data.getTotalClaimAmount())
};

String[] respondentData = {
SITE_ID, data.getLegacyCaseReference(), CASE_TYPE, totalClaimAmount,
RESPONDENT, getCsvCompanyName(data.getRespondent1()),
defendantContactDetails.getDefendantContactName(params), defendantContactDetails.getDefendantContactNumber(params),
CHECK_LIST, PARTY_STATUS, defendantContactDetails.getDefendantContactEmail(params),
SITE_ID, CASE_TYPE, CHECK_LIST, PARTY_STATUS, data.getLegacyCaseReference(), totalClaimAmount, RESPONDENT,
getCsvCompanyName(data.getRespondent1()), defendantContactDetails.getDefendantContactName(params),
defendantContactDetails.getDefendantContactNumber(params),
defendantContactDetails.getDefendantContactEmail(params),
isPilot(data.getTotalClaimAmount())
};

Expand Down

0 comments on commit 5783ea5

Please sign in to comment.