Skip to content

Commit

Permalink
CIV-15697 Missing Organization name on sealed form fix (#5797)
Browse files Browse the repository at this point in the history
* Initial Commit
* Fix
---------
Co-authored-by: krishnanuthalapati <[email protected]>
  • Loading branch information
ShwetaTandel-hmcts authored Nov 22, 2024
1 parent 12d70cf commit b2b35c7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
Binary file modified docker/docmosis/templates/CV-UNS-CLM-ENG-01125.docx
Binary file not shown.
Binary file modified docker/docmosis/templates/CV-UNS-CLM-ENG-01126.docx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ public class SealedClaimForm implements MappableObject {
private final String courtFee;
private final String hearingCourtLocation;
private final StatementOfTruth statementOfTruth;
private final String applicantRepresentativeOrganisationName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ public SealedClaimForm getTemplateData(CaseData caseData, String authorisation)
MultiPartyScenario multiPartyScenario = getMultiPartyScenario(caseData);
String hearingCourtLocation = locationRefDataUtil.getPreferredCourtData(
caseData, authorisation, false);
List<Party> applicants = getApplicants(caseData, multiPartyScenario);

SealedClaimForm.SealedClaimFormBuilder sealedClaimFormBuilder = SealedClaimForm.builder()
.applicants(getApplicants(caseData, multiPartyScenario))
.applicants(applicants)
.respondents(getRespondents(caseData, multiPartyScenario))
.claimValue(caseData.getClaimValue().formData())
.statementOfTruth(caseData.getApplicantSolicitor1ClaimStatementOfTruth())
Expand All @@ -84,6 +85,7 @@ public SealedClaimForm getTemplateData(CaseData caseData, String authorisation)
.map(SolicitorReferences::getRespondentSolicitor1Reference)
.orElse(""))
.caseName(DocmosisTemplateDataUtils.toCaseName.apply(caseData))
.applicantRepresentativeOrganisationName(applicants.get(0).getRepresentative().getOrganisationName())
.courtFee(caseData.getClaimFee().formData());

if (multiPartyScenario == ONE_V_TWO_TWO_LEGAL_REP) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ private void assertThatFieldsAreCorrect_For1V1(SealedClaimForm templateData, Cas
.map(SolicitorReferences::getRespondentSolicitor1Reference)
.orElse("")
),
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData))
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData)),
() -> assertEquals(templateData.getApplicantRepresentativeOrganisationName(), getApplicant(caseData)
.get(0).getRepresentative().getOrganisationName())
);
}

Expand Down Expand Up @@ -320,7 +322,9 @@ private void assertThatFieldsAreCorrect_For1V2SameSolicitor(SealedClaimForm temp
.map(SolicitorReferences::getRespondentSolicitor1Reference)
.orElse("")
),
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData))
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData)),
() -> assertEquals(templateData.getApplicantRepresentativeOrganisationName(), getApplicant(caseData)
.get(0).getRepresentative().getOrganisationName())
);
}

Expand Down Expand Up @@ -352,7 +356,9 @@ private void assertThatFieldsAreCorrect_For2V1(SealedClaimForm templateData, Cas
.map(SolicitorReferences::getRespondentSolicitor1Reference)
.orElse("")
),
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData))
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData)),
() -> assertEquals(templateData.getApplicantRepresentativeOrganisationName(), getApplicant(caseData)
.get(0).getRepresentative().getOrganisationName())
);
}

Expand Down Expand Up @@ -390,7 +396,9 @@ private void assertThatFieldsAreCorrect_For1V2DifferentSolicitor(
() -> assertEquals(
templateData.getRespondent2ExternalReference(), caseData.getRespondentSolicitor2Reference()
),
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData))
() -> assertEquals(templateData.getCaseName(), DocmosisTemplateDataUtils.toCaseName.apply(caseData)),
() -> assertEquals(templateData.getApplicantRepresentativeOrganisationName(), getApplicant(caseData)
.get(0).getRepresentative().getOrganisationName())
);
}

Expand Down

0 comments on commit b2b35c7

Please sign in to comment.