Skip to content

Commit

Permalink
CIV-9440 - CUI: SDO journey is not working when Defendant response is…
Browse files Browse the repository at this point in the history
… Part-Admit (#2951)

* Update RespondToDefenceSpecCallbackHandler.java

* Update FlowStateAllowedEventService.java

added CREATE_SDO event  for PART_ADMIT_NOT_SETTLED_NO_MEDIATION flow state

* Update FlowStateAllowedEventService.java

* Update FlowStateAllowedEventService.java

* added test and other changes.

---------

Co-authored-by: Raja Mani <rajakm@gmail.com>
Co-authored-by: AhsanZX97 <ahsan.zia1@hmcts.net>
  • Loading branch information
3 people committed Jul 21, 2023
1 parent f1f303b commit 5df11d7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private CallbackResponse aboutToSubmit(CallbackParams callbackParams) {
+ " is " + builder.build().getCaseManagementLocation());
}

if (caseData.hasApplicantProceededWithClaim()) {
if (caseData.hasApplicantProceededWithClaim() || (caseData.isPartAdmitClaimSpec() && caseData.isPartAdmitClaimNotSettled())) {
// moving statement of truth value to correct field, this was not possible in mid event.
StatementOfTruth statementOfTruth = caseData.getUiStatementOfTruth();
Applicant1DQ.Applicant1DQBuilder dq = caseData.getApplicant1DQ().toBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AcceptPartAdmitAndPaidConfHeader implements RespondToResponseConfir

@Override
public Optional<String> generateTextFor(CaseData caseData) {
if (caseData.isPartAdmitClaimNotSettled()) {
if (!caseData.isPartAdmitClaimSpec() || caseData.isPartAdmitClaimNotSettled()) {
return Optional.empty();
}
String claimNumber = caseData.getLegacyCaseReference();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AcceptPartAdmitAndPaidConfText implements RespondToResponseConfirma

@Override
public Optional<String> generateTextFor(CaseData caseData) {
if (caseData.isPartAdmitClaimNotSettled()) {
if (!caseData.isPartAdmitClaimSpec() || caseData.isPartAdmitClaimNotSettled()) {
return Optional.empty();
}
String respondentName = caseData.getRespondent1().getPartyName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ public boolean isPartAdmitClaimNotSettled() {
return (
getApplicant1ProceedsWithClaimSpec() != null
|| getApplicant1AcceptAdmitAmountPaidSpec() != null
|| !isPartAdmitClaimSpec()
|| isClaimantIntentionNotSettlePartAdmit()
|| isClaimantConfirmAmountNotPaidPartAdmit());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.NOTIFICATION_ACKNOWLEDGED;
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.NOTIFICATION_ACKNOWLEDGED_TIME_EXTENSION;
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.PART_ADMISSION;
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.PART_ADMIT_NOT_SETTLED_NO_MEDIATION;
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.PAST_APPLICANT_RESPONSE_DEADLINE_AWAITING_CAMUNDA;
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.PAST_CLAIM_DETAILS_NOTIFICATION_DEADLINE_AWAITING_CAMUNDA;
import static uk.gov.hmcts.reform.civil.service.flowstate.FlowState.Main.PAST_CLAIM_DISMISSED_DEADLINE_AWAITING_CAMUNDA;
Expand Down Expand Up @@ -1125,7 +1126,8 @@ public class FlowStateAllowedEventService {
IN_MEDIATION.fullName(),
List.of(
MEDIATION_SUCCESSFUL,
MEDIATION_UNSUCCESSFUL
MEDIATION_UNSUCCESSFUL,
CREATE_SDO
)
),
entry(
Expand Down Expand Up @@ -1158,6 +1160,12 @@ public class FlowStateAllowedEventService {
TRIAL_READINESS,
BUNDLE_CREATION_NOTIFICATION
)
),
entry(
PART_ADMIT_NOT_SETTLED_NO_MEDIATION.fullName(),
List.of(
CREATE_SDO
)
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,8 @@ void shouldChangeCaseState_WhenApplicant1NotAcceptPartAdmitAmountWithoutMediatio
CaseData caseData = CaseData.builder().applicant1AcceptAdmitAmountPaidSpec(YesOrNo.NO)
.respondent1ClaimResponseTypeForSpec(RespondentResponseTypeSpec.PART_ADMISSION)
.responseClaimMediationSpecRequired(YesOrNo.NO)
.applicant1DQ(Applicant1DQ.builder().applicant1RespondToClaimExperts(
ExpertDetails.builder().build()).build())
.respondent1(Party.builder().type(Party.Type.INDIVIDUAL).build()).build();
CallbackParams params = callbackParamsOf(V_2, caseData, ABOUT_TO_SUBMIT);
AboutToStartOrSubmitCallbackResponse response = (AboutToStartOrSubmitCallbackResponse) handler
Expand All @@ -984,6 +986,8 @@ void shouldChangeCaseState_WhenApplicant1NotAcceptPartAdmitAmountWithFastTrackAn
CaseData caseData = CaseData.builder().applicant1AcceptAdmitAmountPaidSpec(YesOrNo.NO)
.respondent1ClaimResponseTypeForSpec(RespondentResponseTypeSpec.PART_ADMISSION)
.responseClaimTrack(FAST_CLAIM.name())
.applicant1DQ(Applicant1DQ.builder().applicant1RespondToClaimExperts(
ExpertDetails.builder().build()).build())
.respondent1(Party.builder().type(Party.Type.INDIVIDUAL).build()).build();
CallbackParams params = callbackParamsOf(V_2, caseData, ABOUT_TO_SUBMIT);
AboutToStartOrSubmitCallbackResponse response = (AboutToStartOrSubmitCallbackResponse) handler
Expand Down

0 comments on commit 5df11d7

Please sign in to comment.