Skip to content

Commit

Permalink
CIV-16609 DJ event sequence update for misceleneous event (#6130)
Browse files Browse the repository at this point in the history
* CIV-16609 changes

* CIV-16609 changes

* CIV-16609 changes

* CIV-16609 change

* Test case updated

---------

Co-authored-by: krishnanuthalapati <32389208+krishnanuthalapati@users.noreply.github.com>
Co-authored-by: Azam <106387766+Azam-Hmcts@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 12, 2025
1 parent 4ca302c commit 6a8559c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.springframework.stereotype.Component;
import uk.gov.hmcts.reform.civil.enums.AllocatedTrack;
import uk.gov.hmcts.reform.civil.enums.CaseCategory;
import uk.gov.hmcts.reform.civil.enums.CaseState;
import uk.gov.hmcts.reform.civil.enums.DJPaymentTypeSelection;
import uk.gov.hmcts.reform.civil.enums.MultiPartyScenario;
import uk.gov.hmcts.reform.civil.enums.ReasonForProceedingOnPaper;
Expand Down Expand Up @@ -2345,8 +2344,7 @@ private void buildMiscellaneousDJEvent(EventHistory.EventHistoryBuilder builder,
String miscTextRequested = "RPA Reason: Default Judgment requested and claim moved offline.";
String miscTextGranted = "RPA Reason: Default Judgment granted and claim moved offline.";

if (featureToggleService.isJOLiveFeedActive()
&& caseData.getCcdState() == CaseState.All_FINAL_ORDERS_ISSUED) {
if (featureToggleService.isJOLiveFeedActive()) {
miscTextGranted = RECORD_JUDGMENT;
}

Expand All @@ -2355,7 +2353,7 @@ private void buildMiscellaneousDJEvent(EventHistory.EventHistoryBuilder builder,
Event.builder()
.eventSequence(prepareEventSequence(builder.build()))
.eventCode(MISCELLANEOUS.getCode())
.dateReceived(LocalDateTime.now())
.dateReceived(getDateOfDjCreated(caseData))
.eventDetailsText(grantedFlag ? miscTextRequested : miscTextGranted)
.eventDetails(EventDetails.builder()
.miscText(grantedFlag ? miscTextRequested : miscTextGranted)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7844,6 +7844,7 @@ public void shouldgenerateRPAfeedfor_DJNoDivergent_case_online_999_event() {
+ "Subtotal \n £1172.00\n\n ### Amount"
+ " already paid \n£100.00\n ## Total still owed \n £1072.00")
.respondent2SameLegalRepresentative(YES)
.joDJCreatedDate(LocalDateTime.now())
.hearingSupportRequirementsDJ(HearingSupportRequirementsDJ.builder().build())
.respondent1ResponseDeadline(LocalDateTime.now().minusDays(15))
.defendantDetailsSpec(DynamicList.builder()
Expand Down Expand Up @@ -7875,6 +7876,7 @@ public void shouldgenerateRPAfeedfor_DJNoDivergent_case_offline_999_event() {
.respondent2(PartyBuilder.builder().individual().build())
.addRespondent2(YES)
.paymentTypeSelection(DJPaymentTypeSelection.REPAYMENT_PLAN)
.joDJCreatedDate(LocalDateTime.now())
.repaymentSummaryObject(
"The judgment will order dsfsdf ffdg to pay £1072.00, "
+ "including the claim fee and interest,"
Expand Down Expand Up @@ -7942,7 +7944,7 @@ public void shouldgenerateRPAfeedfor_DJ_event_update_sequenceno() {
assertThat(eventHistory).extracting("miscellaneous").asList()
.extracting("eventCode").asString().contains("999");
assertThat(eventHistory).extracting("miscellaneous").asList()
.extracting("eventSequence").asString().contains("5");
.extracting("eventSequence").asString().contains("3");
assertThat(eventHistory).extracting("miscellaneous").asList()
.extracting("eventDetailsText").asString().isNotEmpty();
}
Expand Down

0 comments on commit 6a8559c

Please sign in to comment.