generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Hdpi 2036 statement of truth screen english journey #918
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
Merged
arun-hmcts
merged 36 commits into
master
from
HDPI-2036-statement-of-truth-screen-english-journey
Nov 18, 2025
Merged
Changes from 3 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e96647c
HDPI-2036: Statement Of Truth
arun-hmcts a4ce4bf
HDPI-2036: Add StatementOfTruthServiceTest with essential test cases
arun-hmcts 4bfee3e
HDPI-2036: Remove unused import from StatementOfTruthServiceTest
arun-hmcts ec4894a
HDPI-2036: Encapsulate Statement of Truth fields in complex type
arun-hmcts 58438b0
Merge remote-tracking branch 'origin/master' into HDPI-2036-statement…
arun-hmcts 7dec21b
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
arun-hmcts 8d51f7e
HDPI-2036: Add midEvent tests for StatementOfTruth page
arun-hmcts e1a91f2
HDPI-2036: Persist enum names instead of labels in StatementOfTruth
arun-hmcts c29b2a8
HDPI-2036: Combine separator and body labels in StatementOfTruth page
arun-hmcts 0e6d527
Merge remote-tracking branch 'origin/master' into HDPI-2036-statement…
arun-hmcts 7bae38b
HDPI-2036: Change agreement fields from List to String in StatementOf…
arun-hmcts 0989bdf
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
jors95-moj f798ded
Update plugin au.com.dius.pact to v4.6.18 (#932)
renovate[bot] f61b813
Update logback monorepo to v1.5.21 (#931)
renovate[bot] 22635c1
Update plugin com.github.hmcts.rse-cft-lib to v0.19.1922 (#933)
renovate[bot] fe39aff
Hdpi 2191 assured tenancy gfp money judgment (#880)
arun-hmcts 643c158
Update plugin hmcts.ccd.sdk to v6.5.2 (#934)
renovate[bot] fbe8d53
Cleanup payment dummy event code from HDPI-1277 (#923)
adusumillipraveen ddff7b7
Merge remote-tracking branch 'origin/master' into HDPI-2036-statement…
arun-hmcts a6dc697
Refactor StatementOfTruth to use enum types instead of Strings
arun-hmcts af071c8
HDPI-2036: Remove StatementOfTruthTest - tests for removed midEvent h…
arun-hmcts 95c5454
HDPI-2036: Update StatementOfTruthCompletedBy label to include CPR 2.…
arun-hmcts 932fa10
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
madhavi1203 ffe8bc3
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
arun-hmcts 3482340
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
madhavi1203 88f9b38
Merge remote-tracking branch 'origin/master' into HDPI-2036-statement…
arun-hmcts 44e2670
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
madhavi1203 d82742b
HDPI-2036-QA (#924)
madhavi1203 9e3ef5f
Merge origin/master into HDPI-2036-statement-of-truth-screen-english-…
arun-hmcts c40513d
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
arun-hmcts 5078132
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
madhavi1203 c268220
HDPI-2036: Rename statement of truth migration to V037 to resolve con…
arun-hmcts 9f4511b
HDPI-2036: Remove debug log statements from RentArrearsGroundForPosse…
arun-hmcts 66f9733
Merge branch 'master' into HDPI-2036-statement-of-truth-screen-englis…
MoLala1 087901e
merge conflict
madhavi1203 b8255ed
HDPI-2036: Merge origin/master and resolve conflict in RentArrearsGro…
arun-hmcts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/StatementOfTruthAgreementClaimant.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.domain; | ||
|
|
||
| import uk.gov.hmcts.ccd.sdk.api.CCD; | ||
| import uk.gov.hmcts.ccd.sdk.api.HasLabel; | ||
|
|
||
| public enum StatementOfTruthAgreementClaimant implements HasLabel { | ||
|
|
||
| @CCD(label = "I believe that the facts stated in this claim form are true.") | ||
| BELIEVE_TRUE("I believe that the facts stated in this claim form are true."); | ||
|
|
||
| private final String label; | ||
|
|
||
| StatementOfTruthAgreementClaimant(String label) { | ||
| this.label = label; | ||
| } | ||
|
|
||
| @Override | ||
| public String getLabel() { | ||
| return label; | ||
| } | ||
|
|
||
| } | ||
|
|
25 changes: 25 additions & 0 deletions
25
src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/StatementOfTruthAgreementLegalRep.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.domain; | ||
|
|
||
| import uk.gov.hmcts.ccd.sdk.api.CCD; | ||
| import uk.gov.hmcts.ccd.sdk.api.HasLabel; | ||
|
|
||
| public enum StatementOfTruthAgreementLegalRep implements HasLabel { | ||
|
|
||
| @CCD(label = "The claimant believes that the facts stated in this claim form are true. " | ||
arun-hmcts marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| + "I am authorised by the claimant to sign this statement.") | ||
| AGREED("The claimant believes that the facts stated in this claim form are true. " | ||
| + "I am authorised by the claimant to sign this statement."); | ||
|
|
||
| private final String label; | ||
|
|
||
| StatementOfTruthAgreementLegalRep(String label) { | ||
| this.label = label; | ||
| } | ||
|
|
||
| @Override | ||
| public String getLabel() { | ||
| return label; | ||
| } | ||
|
|
||
| } | ||
|
|
||
12 changes: 12 additions & 0 deletions
12
src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/StatementOfTruthCompletedBy.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.domain; | ||
|
|
||
| import uk.gov.hmcts.ccd.sdk.api.CCD; | ||
|
|
||
| public enum StatementOfTruthCompletedBy { | ||
|
|
||
| @CCD(label = "Claimant") CLAIMANT, | ||
|
|
||
| @CCD(label = "Claimant's legal representative (as defined by CPR 2.3 (1))") | ||
| LEGAL_REPRESENTATIVE | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/uk/gov/hmcts/reform/pcs/ccd/model/StatementOfTruth.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| @Builder | ||
| @Data | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| public class StatementOfTruth { | ||
|
|
||
| private String completedBy; | ||
|
|
||
| private List<String> agreementClaimant; | ||
|
|
||
| private String fullNameClaimant; | ||
|
|
||
| private String positionClaimant; | ||
|
|
||
| private List<String> agreementLegalRep; | ||
|
||
|
|
||
| private String fullNameLegalRep; | ||
|
|
||
| private String firmNameLegalRep; | ||
|
|
||
| private String positionLegalRep; | ||
|
|
||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/StatementOfTruthService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.service; | ||
|
|
||
| import org.springframework.stereotype.Service; | ||
| import uk.gov.hmcts.ccd.sdk.api.HasLabel; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.StatementOfTruthCompletedBy; | ||
| import uk.gov.hmcts.reform.pcs.ccd.model.StatementOfTruth; | ||
|
|
||
| import java.util.Collections; | ||
| import java.util.List; | ||
| import java.util.Optional; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| @Service | ||
| public class StatementOfTruthService { | ||
|
|
||
| public StatementOfTruth buildStatementOfTruth(PCSCase pcsCase) { | ||
| if (pcsCase.getStatementOfTruthCompletedBy() == null) { | ||
| return null; | ||
| } | ||
|
|
||
| StatementOfTruth.StatementOfTruthBuilder builder = StatementOfTruth.builder() | ||
| .completedBy(pcsCase.getStatementOfTruthCompletedBy() != null | ||
| ? pcsCase.getStatementOfTruthCompletedBy().name() : null); | ||
|
|
||
| if (pcsCase.getStatementOfTruthCompletedBy() == StatementOfTruthCompletedBy.CLAIMANT) { | ||
| builder.agreementClaimant(mapToLabels(pcsCase.getStatementOfTruthAgreementClaimant())) | ||
| .fullNameClaimant(pcsCase.getStatementOfTruthFullNameClaimant()) | ||
| .positionClaimant(pcsCase.getStatementOfTruthPositionClaimant()); | ||
| } else if (pcsCase.getStatementOfTruthCompletedBy() == StatementOfTruthCompletedBy.LEGAL_REPRESENTATIVE) { | ||
| builder.agreementLegalRep(mapToLabels(pcsCase.getStatementOfTruthAgreementLegalRep())) | ||
arun-hmcts marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| .fullNameLegalRep(pcsCase.getStatementOfTruthFullNameLegalRep()) | ||
| .firmNameLegalRep(pcsCase.getStatementOfTruthFirmNameLegalRep()) | ||
| .positionLegalRep(pcsCase.getStatementOfTruthPositionLegalRep()); | ||
| } | ||
|
|
||
| return builder.build(); | ||
| } | ||
|
|
||
| private <T extends HasLabel> List<String> mapToLabels(List<T> items) { | ||
| return Optional.ofNullable(items) | ||
| .orElse(Collections.emptyList()) | ||
| .stream() | ||
| .map(HasLabel::getLabel) | ||
| .collect(Collectors.toList()); | ||
| } | ||
|
|
||
| } | ||
|
|
||
|
|
||
|
|
||
2 changes: 2 additions & 0 deletions
2
src/main/resources/db/migration/V035__add_statement_of_truth_column.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE pcs_case ADD COLUMN statement_of_truth JSONB; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.