From 673fdaf79bf449a93960b8f3e57e9174601678d2 Mon Sep 17 00:00:00 2001 From: bhagyashreesharma90 Date: Thu, 23 May 2024 11:40:59 +0100 Subject: [PATCH 1/8] CIV-12857 add judgment by admission doctype --- .../reform/civil/documentmanagement/model/DocumentType.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java b/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java index 4d361dc3..6acff3fa 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java @@ -47,5 +47,7 @@ public enum DocumentType { RECORD_JUDGMENT_DETERMINATION_OF_MEANS_LETTER, DEFAULT_JUDGMENT_COVER_LETTER, DECISION_MADE_ON_APPLICATIONS, - DEFAULT_JUDGMENT_NON_DIVERGENT_SPEC_PIN_IN_LETTER; + DEFAULT_JUDGMENT_NON_DIVERGENT_SPEC_PIN_IN_LETTER, + JUDGMENT_BY_ADMISSION_CLAIMANT, + JUDGMENT_BY_ADMISSION_DEFENDANT; } From 53f32c47de67ee3bee740b5719ed432de123c09d Mon Sep 17 00:00:00 2001 From: Mark Drummond Date: Wed, 5 Jun 2024 16:06:20 +0100 Subject: [PATCH 2/8] New feature toggle for pre sdo states NRO --- .../gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java | 4 ++++ .../hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java | 1 + 2 files changed, 5 insertions(+) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java index 7b87fb24..c51c1475 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java @@ -60,4 +60,8 @@ public boolean isFeatureEnabledForLocation(String feature, String location, bool public boolean isFeatureEnabledForDate(String feature, Long date, boolean defaultValue) { return internalClient.boolVariation(feature, createLDUser().custom("timestamp", date).build(), defaultValue); } + + public boolean isFeatureEnabledForCaseState(String feature, String caseState, boolean defaultValue) { + return internalClient.boolVariation(feature, createLDUser().custom("caseState", caseState).build(), defaultValue); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java b/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java index 19eac51b..2f6d7230 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java @@ -91,6 +91,7 @@ void shouldReturnCorrectState_whenUserWithLocationIsProvided(Boolean toggleState .custom("timestamp", String.valueOf(System.currentTimeMillis())) .custom("environment", FAKE_ENVIRONMENT) .custom("location", "000000") + .custom("caseState", "A_CASE_STATE") .build(); givenToggle(FAKE_FEATURE, toggleState); From f06fec8c87c79dc6f6942c141f5135c2437eba43 Mon Sep 17 00:00:00 2001 From: Mark Drummond Date: Thu, 6 Jun 2024 14:56:17 +0100 Subject: [PATCH 3/8] New feature toggle for pre sdo states NRO --- .../hmcts/reform/civil/launchdarkly/FeatureToggleApi.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java index c51c1475..185c3565 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java @@ -64,4 +64,9 @@ public boolean isFeatureEnabledForDate(String feature, Long date, boolean defaul public boolean isFeatureEnabledForCaseState(String feature, String caseState, boolean defaultValue) { return internalClient.boolVariation(feature, createLDUser().custom("caseState", caseState).build(), defaultValue); } + + public boolean isFeatureEnabledForCaseStateAndLocation(String feature, String location, String caseState, boolean defaultValue) { + return internalClient.boolVariation(feature, createLDUser() + .custom( "location", location).custom("caseState", caseState).build(), defaultValue); + } } From 85b54d227dc2fbcf3dd4fbd1c39cfe50cd2f3ec5 Mon Sep 17 00:00:00 2001 From: Mark Drummond Date: Thu, 6 Jun 2024 14:59:51 +0100 Subject: [PATCH 4/8] New feature toggle for pre sdo states NRO --- .../gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java index 185c3565..7424016e 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java @@ -67,6 +67,6 @@ public boolean isFeatureEnabledForCaseState(String feature, String caseState, bo public boolean isFeatureEnabledForCaseStateAndLocation(String feature, String location, String caseState, boolean defaultValue) { return internalClient.boolVariation(feature, createLDUser() - .custom( "location", location).custom("caseState", caseState).build(), defaultValue); + .custom("location", location).custom("caseState", caseState).build(), defaultValue); } } From 3922842d973dca5ac691f4da6ee1437528802963 Mon Sep 17 00:00:00 2001 From: Mark Drummond Date: Thu, 6 Jun 2024 17:09:45 +0100 Subject: [PATCH 5/8] New LocationRefDataService for getting CNBC buildURIforCnbcSpec --- .../reform/civil/launchdarkly/FeatureToggleApi.java | 9 --------- .../civil/referencedata/LocationRefDataService.java | 7 +++++++ .../reform/civil/launchdarkly/FeatureToggleApiTest.java | 1 - 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java index 7424016e..7b87fb24 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApi.java @@ -60,13 +60,4 @@ public boolean isFeatureEnabledForLocation(String feature, String location, bool public boolean isFeatureEnabledForDate(String feature, Long date, boolean defaultValue) { return internalClient.boolVariation(feature, createLDUser().custom("timestamp", date).build(), defaultValue); } - - public boolean isFeatureEnabledForCaseState(String feature, String caseState, boolean defaultValue) { - return internalClient.boolVariation(feature, createLDUser().custom("caseState", caseState).build(), defaultValue); - } - - public boolean isFeatureEnabledForCaseStateAndLocation(String feature, String location, String caseState, boolean defaultValue) { - return internalClient.boolVariation(feature, createLDUser() - .custom("location", location).custom("caseState", caseState).build(), defaultValue); - } } diff --git a/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java b/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java index 53d8a843..442305b9 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java @@ -140,6 +140,13 @@ private URI buildURIforCcmcc() { return builder.buildAndExpand(new HashMap<>()).toUri(); } + private URI buildURIforCnbcSpec() { + String queryURL = lrdConfiguration.getUrl() + lrdConfiguration.getEndpoint(); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(queryURL) + .queryParam("court_venue_name", "Civil National Business Centre"); + return builder.buildAndExpand(new HashMap<>()).toUri(); + } + private URI buildURIForDefaultJudgments() { String queryURL = lrdConfiguration.getUrl() + lrdConfiguration.getEndpoint(); UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(queryURL) diff --git a/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java b/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java index 2f6d7230..19eac51b 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/launchdarkly/FeatureToggleApiTest.java @@ -91,7 +91,6 @@ void shouldReturnCorrectState_whenUserWithLocationIsProvided(Boolean toggleState .custom("timestamp", String.valueOf(System.currentTimeMillis())) .custom("environment", FAKE_ENVIRONMENT) .custom("location", "000000") - .custom("caseState", "A_CASE_STATE") .build(); givenToggle(FAKE_FEATURE, toggleState); From d0a0008796c0cd41d9f116600ddb26c26b06cc04 Mon Sep 17 00:00:00 2001 From: Mark Drummond Date: Thu, 6 Jun 2024 17:18:43 +0100 Subject: [PATCH 6/8] New LocationRefDataService for getting CNBC buildURIforCnbcSpec --- .../referencedata/LocationRefDataService.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java b/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java index 442305b9..0744c835 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/referencedata/LocationRefDataService.java @@ -58,6 +58,31 @@ public LocationRefData getCcmccLocation(String authToken) { return LocationRefData.builder().build(); } + public LocationRefData getCnbcLocation(String authToken) { + try { + ResponseEntity> responseEntity = restTemplate.exchange( + buildURIforCnbcSpec(), + HttpMethod.GET, + getHeaders(authToken), + new ParameterizedTypeReference>() { + } + ); + List cnbcLocations = responseEntity.getBody(); + if (cnbcLocations == null || cnbcLocations.isEmpty()) { + log.warn("Location Reference Data Lookup did not return any CNBC location"); + return LocationRefData.builder().build(); + } else { + if (cnbcLocations.size() > 1) { + log.warn("Location Reference Data Lookup returned more than one CNBC location"); + } + return cnbcLocations.get(0); + } + } catch (Exception e) { + log.error("Location Reference Data Lookup Failed - " + e.getMessage(), e); + } + return LocationRefData.builder().build(); + } + public List getCourtLocationsForDefaultJudgments(String authToken) { try { ResponseEntity> responseEntity = restTemplate.exchange( From d20220f3b69f343b6847f2aaefab64d3120d6381 Mon Sep 17 00:00:00 2001 From: Sherlyn Khaw Date: Tue, 11 Jun 2024 13:07:00 +0100 Subject: [PATCH 7/8] CIV-13800 Added new document type - fixed recoverable cost supporting document --- .../reform/civil/documentmanagement/model/DocumentType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java b/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java index b806e652..3f262e53 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java @@ -19,6 +19,7 @@ public enum DocumentType { COURT_OFFICER_ORDER, DEFENCE_TRANSLATED_DOCUMENT, DRAFT_CLAIM_FORM, + FIXED_RECOVERABLE_COST_SUPPORTING_DOCUMENT, //General Application Document Type GENERAL_ORDER, DIRECTION_ORDER, From 54c21a5dafcc2b1f0b7fefdecfb88c41736a603b Mon Sep 17 00:00:00 2001 From: m-meulendijks-v1 <107135537+m-meulendijks-v1@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:12:42 +0100 Subject: [PATCH 8/8] CIV-13930 - add Document Type request for reconsideration (#175) Co-authored-by: dharmendra kumar --- .../reform/civil/documentmanagement/model/DocumentType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java b/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java index 3f262e53..2a6ac033 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/documentmanagement/model/DocumentType.java @@ -19,6 +19,7 @@ public enum DocumentType { COURT_OFFICER_ORDER, DEFENCE_TRANSLATED_DOCUMENT, DRAFT_CLAIM_FORM, + REQUEST_FOR_RECONSIDERATION, FIXED_RECOVERABLE_COST_SUPPORTING_DOCUMENT, //General Application Document Type GENERAL_ORDER,