diff --git a/pom.xml b/pom.xml index ae70f11c27..27a5fe184d 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT pom Progression services application diff --git a/progression-command/pom.xml b/progression-command/pom.xml index 2adad028ce..1a44c2b5f1 100644 --- a/progression-command/pom.xml +++ b/progression-command/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-command pom diff --git a/progression-command/progression-command-api/pom.xml b/progression-command/progression-command-api/pom.xml index 517ad7429a..dc5f1b2a1e 100644 --- a/progression-command/progression-command-api/pom.xml +++ b/progression-command/progression-command-api/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-command - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-command-api war diff --git a/progression-command/progression-command-handler/pom.xml b/progression-command/progression-command-handler/pom.xml index 4474d76455..ce83e1794a 100644 --- a/progression-command/progression-command-handler/pom.xml +++ b/progression-command/progression-command-handler/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-command - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-command-handler war diff --git a/progression-domain/pom.xml b/progression-domain/pom.xml index c792ed4821..186efb13eb 100644 --- a/progression-domain/pom.xml +++ b/progression-domain/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-domain pom diff --git a/progression-domain/progression-datatypes-common/pom.xml b/progression-domain/progression-datatypes-common/pom.xml index 019a0d91ac..bd386e1aeb 100644 --- a/progression-domain/progression-datatypes-common/pom.xml +++ b/progression-domain/progression-datatypes-common/pom.xml @@ -3,7 +3,7 @@ progression-domain uk.gov.moj.cpp.progression - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 diff --git a/progression-domain/progression-domain-aggregate/pom.xml b/progression-domain/progression-domain-aggregate/pom.xml index ccadeee9bb..d4fa0ab142 100644 --- a/progression-domain/progression-domain-aggregate/pom.xml +++ b/progression-domain/progression-domain-aggregate/pom.xml @@ -3,7 +3,7 @@ progression-domain uk.gov.moj.cpp.progression - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 progression-domain-aggregate diff --git a/progression-domain/progression-domain-common/pom.xml b/progression-domain/progression-domain-common/pom.xml index d9f73a3833..eebd52ac83 100644 --- a/progression-domain/progression-domain-common/pom.xml +++ b/progression-domain/progression-domain-common/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-domain - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-domain-common diff --git a/progression-domain/progression-domain-message/pom.xml b/progression-domain/progression-domain-message/pom.xml index ef7bc37fc1..9b5f2ee239 100644 --- a/progression-domain/progression-domain-message/pom.xml +++ b/progression-domain/progression-domain-message/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.progression progression-domain - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-domain-message diff --git a/progression-event-sources/pom.xml b/progression-event-sources/pom.xml index cc2c548ed4..3586d246e5 100644 --- a/progression-event-sources/pom.xml +++ b/progression-event-sources/pom.xml @@ -3,7 +3,7 @@ progression-parent uk.gov.moj.cpp.progression - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 diff --git a/progression-event/pom.xml b/progression-event/pom.xml index a6e96e1384..b72e1f3c1b 100644 --- a/progression-event/pom.xml +++ b/progression-event/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-event pom diff --git a/progression-event/progression-event-indexer/pom.xml b/progression-event/progression-event-indexer/pom.xml index 2eba6a467d..abd1a64349 100644 --- a/progression-event/progression-event-indexer/pom.xml +++ b/progression-event/progression-event-indexer/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-event - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-event-indexer war diff --git a/progression-event/progression-event-listener/pom.xml b/progression-event/progression-event-listener/pom.xml index f6f305cf21..096635a033 100644 --- a/progression-event/progression-event-listener/pom.xml +++ b/progression-event/progression-event-listener/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-event - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-event-listener war diff --git a/progression-event/progression-event-processor/pom.xml b/progression-event/progression-event-processor/pom.xml index 13bd0f024e..257a89d9ea 100644 --- a/progression-event/progression-event-processor/pom.xml +++ b/progression-event/progression-event-processor/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-event - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-event-processor war diff --git a/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/CourtApplicationService.java b/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/CourtApplicationService.java index ad58a22913..838d00a14c 100644 --- a/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/CourtApplicationService.java +++ b/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/CourtApplicationService.java @@ -26,6 +26,7 @@ public class CourtApplicationService { private static final Logger LOGGER = LoggerFactory.getLogger(CourtApplicationService.class); private static final String PROSECUTOR_CONTACT_EMAIL_ADDRESS_KEY = "contactEmailAddress"; + private static final String PROSECUTOR_CPS_CC_EMAIL_ADDRESS_KEY = "cpsCcEmailAddress"; private static final String PROSECUTOR_OUCODE_KEY = "oucode"; private static final String PROSECUTOR_MAJOR_CREDITOR_CODE_KEY = "majorCreditorCode"; @@ -41,8 +42,12 @@ public class CourtApplicationService { + public ProsecutingAuthority getProsecutingAuthority(final UUID prosecutionAuthorityId, final JsonEnvelope jsonEnvelope) { + return getProsecutingAuthority(prosecutionAuthorityId, jsonEnvelope, false); + } + @SuppressWarnings("pmd:NullAssignment") - public ProsecutingAuthority getProsecutingAuthority(UUID prosecutionAuthorityId, final JsonEnvelope jsonEnvelope) { + public ProsecutingAuthority getProsecutingAuthority(final UUID prosecutionAuthorityId, final JsonEnvelope jsonEnvelope, final boolean isCps) { final ProsecutingAuthority.Builder prosecutingAuthorityBuilder = prosecutingAuthority().withProsecutionAuthorityId(prosecutionAuthorityId); @@ -53,9 +58,11 @@ public ProsecutingAuthority getProsecutingAuthority(UUID prosecutionAuthorityId, .withWelshName(jsonObject.getString("nameWelsh", null)) .withAddress(isNull(jsonObject.getJsonObject("address")) ? null : jsonObjectToObjectConverter.convert(jsonObject.getJsonObject("address"), Address.class)); - if (jsonObject.containsKey(PROSECUTOR_CONTACT_EMAIL_ADDRESS_KEY)) { + // CPS prosecutors are notified on their CPS CC email address rather than the contact email address + final String emailAddressKey = isCps ? PROSECUTOR_CPS_CC_EMAIL_ADDRESS_KEY : PROSECUTOR_CONTACT_EMAIL_ADDRESS_KEY; + if (jsonObject.containsKey(emailAddressKey) && !jsonObject.isNull(emailAddressKey)) { prosecutingAuthorityBuilder.withContact(contactNumber() - .withPrimaryEmail(jsonObject.getString(PROSECUTOR_CONTACT_EMAIL_ADDRESS_KEY)) + .withPrimaryEmail(jsonObject.getString(emailAddressKey)) .build()); } } diff --git a/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/NotificationService.java b/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/NotificationService.java index 87a9e6b95c..6ab227d753 100644 --- a/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/NotificationService.java +++ b/progression-event/progression-event-processor/src/main/java/uk/gov/moj/cpp/progression/service/NotificationService.java @@ -136,6 +136,11 @@ public class NotificationService { private static final String EMPTY = ""; private static final String CONTENT_TYPE = "application/pdf"; private static final String MATERIAL_TYPE = "Court Final orders"; + private static final String PROGRESSION_QUERY_PROSECUTION_CASE = "progression.query.prosecutioncase"; + private static final String PROSECUTION_CASE = "prosecutionCase"; + private static final String PROSECUTOR = "prosecutor"; + private static final String PROSECUTOR_ID = "prosecutorId"; + private static final String IS_CPS = "isCps"; @Inject private Enveloper enveloper; @Inject @@ -623,11 +628,67 @@ private static boolean isMatchingProsecutionAuthority( .orElse(false); } - private void sendNotificationToInformant(final JsonEnvelope event, final CourtApplication courtApplication, final Boolean isWelshTranslationRequired, final CourtCentre courtCentre, final String hearingDate, final String hearingTime, final JurisdictionType jurisdictionType, final Boolean isAmended, final LocalDate issueDate, final InformantNotificationTracker informantNotificationTracker) { + private void sendNotificationToInformantAndProsecutor(final JsonEnvelope event, final CourtApplication courtApplication, final Boolean isWelshTranslationRequired, final CourtCentre courtCentre, final String hearingDate, final String hearingTime, + final JurisdictionType jurisdictionType, final Boolean isAmended, final LocalDate issueDate, final InformantNotificationTracker informantNotificationTracker) { + sendNotificationToInformant(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, issueDate); + sendNotificationToProsecutor(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, issueDate, informantNotificationTracker); + } + + private void sendNotificationToInformant(final JsonEnvelope event, final CourtApplication courtApplication, final Boolean isWelshTranslationRequired, final CourtCentre courtCentre, final String hearingDate, final String hearingTime, + final JurisdictionType jurisdictionType, final Boolean isAmended, final LocalDate issueDate) { final UUID informantAuthorityId = courtApplication.getCourtApplicationCases().get(0).getProsecutionCaseIdentifier().getProsecutionAuthorityId(); final ProsecutingAuthority prosecutingAuthority = courtApplicationService.getProsecutingAuthority(informantAuthorityId, event); final PostalNotificationDetails postalNotificationDetails = buildPostalNotificationDetails(courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, null, jurisdictionType, isAmended, issueDate); - sendNotificationToProsecutor(event, prosecutingAuthority, postalNotificationDetails); + sendNotificationToProsecutingAuthority(event, prosecutingAuthority, postalNotificationDetails); + } + + private void sendNotificationToProsecutor(final JsonEnvelope event, final CourtApplication courtApplication, final Boolean isWelshTranslationRequired, final CourtCentre courtCentre, final String hearingDate, final String hearingTime, + final JurisdictionType jurisdictionType, final Boolean isAmended, final LocalDate issueDate, final InformantNotificationTracker informantNotificationTracker) { + + final UUID caseId = courtApplication.getCourtApplicationCases().get(0).getProsecutionCaseId(); + if (isNull(caseId)) { + LOGGER.info("No prosecution case id on court application {}; skipping prosecutor notification.", courtApplication.getId()); + return; + } + + final Optional currentProsecutor = getCurrentProsecutor(event, caseId); + if (!currentProsecutor.isPresent()) { + LOGGER.info("No current prosecutor found for case {}; skipping prosecutor notification.", caseId); + return; + } + + final JsonObject prosecutorJson = currentProsecutor.get(); + final UUID prosecutorId = UUID.fromString(prosecutorJson.getString(PROSECUTOR_ID)); + final boolean isCps = prosecutorJson.getBoolean(IS_CPS, false); + + // Reuse the informant tracker so we don't email the same prosecuting authority twice + if (prosecutorId.equals(informantNotificationTracker.getProsecutionAuthorityId())) { + LOGGER.info("Prosecutor {} already notified as informant; skipping prosecutor notification.", prosecutorId); + return; + } + + final ProsecutingAuthority prosecutingAuthority = courtApplicationService.getProsecutingAuthority(prosecutorId, event, isCps); + final PostalNotificationDetails postalNotificationDetails = buildPostalNotificationDetails(courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, null, jurisdictionType, isAmended, issueDate); + sendNotificationToProsecutingAuthority(event, prosecutingAuthority, postalNotificationDetails); + } + + private Optional getCurrentProsecutor(final JsonEnvelope event, final UUID caseId) { + final JsonObject requestParameter = createObjectBuilder().add(CASE_ID, caseId.toString()).build(); + + final JsonEnvelope response = requester.requestAsAdmin(enveloper + .withMetadataFrom(event, PROGRESSION_QUERY_PROSECUTION_CASE) + .apply(requestParameter)); + + final JsonObject payload = response.payloadAsJsonObject(); + if (payload.isEmpty() || !payload.containsKey(PROSECUTION_CASE)) { + return Optional.empty(); + } + + final JsonObject prosecutionCase = payload.getJsonObject(PROSECUTION_CASE); + if (prosecutionCase.containsKey(PROSECUTOR) && prosecutionCase.getJsonObject(PROSECUTOR).containsKey(PROSECUTOR_ID)) { + return Optional.of(prosecutionCase.getJsonObject(PROSECUTOR)); + } + return Optional.empty(); } private void sendNotification(JsonEnvelope event, CourtApplication courtApplication, Boolean isWelshTranslationRequired, CourtCentre courtCentre, String hearingDate, String hearingTime, JurisdictionType jurisdictionType, CourtApplicationParty courtApplicationParty, Optional associatedDefenceOrganisation, Boolean isAmended, LocalDate issueDate) { @@ -711,9 +772,9 @@ private void sendNotification(final JsonEnvelope event, final UUID notificationI } - private void sendNotificationToProsecutor(final JsonEnvelope event, - final ProsecutingAuthority prosecutingAuthority, - final PostalNotificationDetails postalNotificationDetails) { + private void sendNotificationToProsecutingAuthority(final JsonEnvelope event, + final ProsecutingAuthority prosecutingAuthority, + final PostalNotificationDetails postalNotificationDetails) { final UUID notificationId = UUID.randomUUID(); @@ -1040,7 +1101,7 @@ public void sendNotification(final JsonEnvelope event, final CourtApplication co sendNotificationToThirdParties(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, LocalDate.now(), informantNotificationTracker); LOGGER.info("InformantNotificationTracker= {}", informantNotificationTracker); if (shouldSendInformantNotification(courtApplication, informantNotificationTracker)) { - sendNotificationToInformant(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, LocalDate.now(), informantNotificationTracker); + sendNotificationToInformantAndProsecutor(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, LocalDate.now(), informantNotificationTracker); } } } @@ -1076,7 +1137,7 @@ public void sendNotificationForAutoApplication(final JsonEnvelope event, final S LOGGER.info("InformantNotificationTracker= {}", informantNotificationTracker); if (shouldSendInformantNotification(courtApplication, informantNotificationTracker)) { - sendNotificationToInformant(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, LocalDate.now(), informantNotificationTracker); + sendNotificationToInformantAndProsecutor(event, courtApplication, isWelshTranslationRequired, courtCentre, hearingDate, hearingTime, jurisdictionType, isAmended, LocalDate.now(), informantNotificationTracker); } if(nonNull(isWelshTranslationRequired) && isWelshTranslationRequired) { diff --git a/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/CourtApplicationServiceTest.java b/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/CourtApplicationServiceTest.java index 33c67b3f63..daebb2c56c 100644 --- a/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/CourtApplicationServiceTest.java +++ b/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/CourtApplicationServiceTest.java @@ -90,6 +90,69 @@ public void shouldReturnCourtApplicationPartyWhenProsecutingAuthorityDataExists( assertThat(result.getAddress().getPostcode(), is("SW1A 1AA")); } + @Test + public void shouldUseCpsCcEmailAddressWhenProsecutorIsCps() { + JsonObject prosecutorJson = Json.createObjectBuilder() + .add("fullName", "CPS West Midlands") + .add("contactEmailAddress", "contact@cps.gov.uk") + .add("cpsCcEmailAddress", "cc@cps.gov.uk") + .add("cpsFlag", true) + .add("address", Json.createObjectBuilder() + .add("line1", "123 Main St") + .add("postcode", "SW1A 1AA") + .build()) + .build(); + + var address = Address.address() + .withAddress1("123 Main St") + .withPostcode("SW1A 1AA").build(); + + when(referenceDataService.getProsecutor(any(JsonEnvelope.class), any(UUID.class), any(Requester.class))) + .thenReturn(Optional.of(prosecutorJson)); + when(jsonObjectToObjectConverter.convert(prosecutorJson.getJsonObject("address"), Address.class)) + .thenReturn(address); + + ProsecutingAuthority result = courtApplicationService.getProsecutingAuthority(prosecutionAuthorityId, jsonEnvelope, true); + + // For a CPS prosecutor the CPS CC email address is used instead of the contact email address + assertThat(result.getContact().getPrimaryEmail(), is("cc@cps.gov.uk")); + // The reference data is only queried once (no second getProsecutorV2 call) + verify(referenceDataService, times(1)).getProsecutor(jsonEnvelope, prosecutionAuthorityId, requester); + } + + @Test + public void shouldUseContactEmailAddressWhenProsecutorIsNotCps() { + JsonObject prosecutorJson = Json.createObjectBuilder() + .add("fullName", "Transport for London") + .add("contactEmailAddress", "contact@tfl.gov.uk") + .add("cpsCcEmailAddress", "cc@cps.gov.uk") + .build(); + + when(referenceDataService.getProsecutor(any(JsonEnvelope.class), any(UUID.class), any(Requester.class))) + .thenReturn(Optional.of(prosecutorJson)); + + ProsecutingAuthority result = courtApplicationService.getProsecutingAuthority(prosecutionAuthorityId, jsonEnvelope, false); + + assertThat(result.getContact().getPrimaryEmail(), is("contact@tfl.gov.uk")); + } + + @Test + public void shouldNotSetContactWhenCpsProsecutorHasNoCpsCcEmailAddress() { + JsonObject prosecutorJson = Json.createObjectBuilder() + .add("fullName", "CPS West Midlands") + .add("contactEmailAddress", "contact@cps.gov.uk") + .add("cpsFlag", true) + .build(); + + when(referenceDataService.getProsecutor(any(JsonEnvelope.class), any(UUID.class), any(Requester.class))) + .thenReturn(Optional.of(prosecutorJson)); + + ProsecutingAuthority result = courtApplicationService.getProsecutingAuthority(prosecutionAuthorityId, jsonEnvelope, true); + + // No CPS CC email address means no contact - a postal notification will be sent downstream + assertThat(result.getContact(), is(nullValue())); + } + @Test public void shouldReturnEmptyCourtApplicationPartyWhenNoProsecutingAuthorityDataExists() { when(referenceDataService.getProsecutor(any(JsonEnvelope.class), any(UUID.class), any(Requester.class))) diff --git a/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/NotificationServiceTest.java b/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/NotificationServiceTest.java index 58cedb5097..285280356e 100644 --- a/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/NotificationServiceTest.java +++ b/progression-event/progression-event-processor/src/test/java/uk/gov/moj/cpp/progression/service/NotificationServiceTest.java @@ -17,6 +17,7 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -1301,6 +1302,155 @@ public void sendNotificationForTheInformants() { withJsonPath("$.applicationId", equalTo(applicationId.toString())), withJsonPath("$.notifications[0].sendToAddress", equalTo("informant@test.com")))))); } + + @Test + public void shouldNotSendDuplicateEmailWhenCurrentProsecutorIsTheInformant() { + + doNothing().when(systemIdMapperService).mapNotificationIdToApplicationId(applicationId, notificationId); + + when(applicationParameters.getApplicationTemplateId()).thenReturn("47705b45-fbdc-44ec-9fe5-ff89b707e6ce"); + + final UUID caseId = randomUUID(); + final UUID informantAuthorityId = randomUUID(); + + final CourtApplication courtApplication = CourtApplication.courtApplication() + .withId(applicationId) + .withType(CourtApplicationType.courtApplicationType() + .withAppealFlag(true) + .withSummonsTemplateType(NOT_APPLICABLE).build()) + .withCourtApplicationCases(getCourtApplicationCasesWithCaseId(caseId, informantAuthorityId)) + .withApplicant(CourtApplicationParty.courtApplicationParty() + .withMasterDefendant(MasterDefendant.masterDefendant().withPersonDefendant(PersonDefendant.personDefendant().withPersonDetails(Person.person().withFirstName("Test").withLastName("Test").build()).build()).build()) + .withPersonDetails(Person.person().withContact(ContactNumber.contactNumber().withPrimaryEmail("applicant@test.com").build()).build()) + .build()) + .build(); + + when(postalService.courtDocument(eq(applicationId), any(UUID.class), any(JsonEnvelope.class), eq(null))).thenReturn(getCourtDocument()); + when(courtApplicationService.getProsecutingAuthority(any(UUID.class), any(JsonEnvelope.class))).thenReturn(prosecutingAuthority); + // the current prosecutor on the case is the same authority that was notified as the informant + when(requester.requestAsAdmin(any(JsonEnvelope.class))).thenReturn(prosecutionCaseEnvelope(informantAuthorityId, false)); + + notificationService.sendNotification(envelope, courtApplication, false, courtCentre, hearingDateTime, JurisdictionType.CROWN, false); + + // prosecutor notification is skipped, so the CPS-aware getProsecutingAuthority is never called ... + verify(courtApplicationService, never()).getProsecutingAuthority(any(UUID.class), any(JsonEnvelope.class), anyBoolean()); + // ... and only the applicant (email + doc) and informant (email + doc) notifications are sent + verify(this.sender, times(4)).send(this.envelopeArgumentCaptor.capture()); + } + + @Test + public void shouldSendPostalNotificationWhenCpsProsecutorHasNoEmail() { + + doNothing().when(systemIdMapperService).mapNotificationIdToApplicationId(applicationId, notificationId); + + when(applicationParameters.getApplicationTemplateId()).thenReturn("47705b45-fbdc-44ec-9fe5-ff89b707e6ce"); + + final UUID caseId = randomUUID(); + final UUID informantAuthorityId = randomUUID(); + final UUID prosecutorId = randomUUID(); + + final CourtApplication courtApplication = CourtApplication.courtApplication() + .withId(applicationId) + .withType(CourtApplicationType.courtApplicationType() + .withAppealFlag(true) + .withSummonsTemplateType(NOT_APPLICABLE).build()) + .withCourtApplicationCases(getCourtApplicationCasesWithCaseId(caseId, informantAuthorityId)) + .withApplicant(CourtApplicationParty.courtApplicationParty() + .withMasterDefendant(MasterDefendant.masterDefendant().withPersonDefendant(PersonDefendant.personDefendant().withPersonDetails(Person.person().withFirstName("Test").withLastName("Test").build()).build()).build()) + .withPersonDetails(Person.person().withContact(ContactNumber.contactNumber().withPrimaryEmail("applicant@test.com").build()).build()) + .build()) + .build(); + + // A CPS prosecutor with an address but no CPS CC email address + final ProsecutingAuthority cpsProsecutorWithoutEmail = ProsecutingAuthority.prosecutingAuthority() + .withProsecutionAuthorityId(prosecutorId) + .withProsecutionAuthorityCode("CPS") + .withName("CPS West Midlands") + .withAddress(Address.address().withAddress1("Colmore Gate").withPostcode("B3 2QA").build()) + .build(); + + when(postalService.courtDocument(eq(applicationId), any(UUID.class), any(JsonEnvelope.class), eq(null))).thenReturn(getCourtDocument()); + when(courtApplicationService.getProsecutingAuthority(any(UUID.class), any(JsonEnvelope.class))).thenReturn(prosecutingAuthority); + when(courtApplicationService.getProsecutingAuthority(any(UUID.class), any(JsonEnvelope.class), anyBoolean())).thenReturn(cpsProsecutorWithoutEmail); + when(requester.requestAsAdmin(any(JsonEnvelope.class))).thenReturn(prosecutionCaseEnvelope(prosecutorId, true)); + + notificationService.sendNotification(envelope, courtApplication, false, courtCentre, hearingDateTime, JurisdictionType.CROWN, false); + + // No email for the CPS prosecutor, so a postal notification is sent instead + verify(postalService).sendPostalNotification(eq(envelope), eq(applicationId), eq(postalNotification), any(), any()); + } + + @Test + public void shouldEmailCpsProsecutorOnCpsCcEmailAddress() { + + doNothing().when(systemIdMapperService).mapNotificationIdToApplicationId(applicationId, notificationId); + + when(applicationParameters.getApplicationTemplateId()).thenReturn("47705b45-fbdc-44ec-9fe5-ff89b707e6ce"); + + final UUID caseId = randomUUID(); + final UUID informantAuthorityId = randomUUID(); + final UUID prosecutorId = randomUUID(); + + final CourtApplication courtApplication = CourtApplication.courtApplication() + .withId(applicationId) + .withApplicationReference("URN") + .withType(CourtApplicationType.courtApplicationType() + .withAppealFlag(true) + .withSummonsTemplateType(NOT_APPLICABLE).build()) + .withCourtApplicationCases(getCourtApplicationCasesWithCaseId(caseId, informantAuthorityId)) + .withApplicant(CourtApplicationParty.courtApplicationParty() + .withMasterDefendant(MasterDefendant.masterDefendant().withPersonDefendant(PersonDefendant.personDefendant().withPersonDetails(Person.person().withFirstName("Test").withLastName("Test").build()).build()).build()) + .withPersonDetails(Person.person().withContact(ContactNumber.contactNumber().withPrimaryEmail("applicant@test.com").build()).build()) + .build()) + .build(); + + // A CPS prosecutor whose resolved email is the CPS CC email address + final ProsecutingAuthority cpsProsecutor = ProsecutingAuthority.prosecutingAuthority() + .withProsecutionAuthorityId(prosecutorId) + .withProsecutionAuthorityCode("CPS") + .withName("CPS West Midlands") + .withAddress(Address.address().withAddress1("Colmore Gate").withPostcode("B3 2QA").build()) + .withContact(ContactNumber.contactNumber().withPrimaryEmail("cc@cps.gov.uk").build()) + .build(); + + when(postalService.courtDocument(eq(applicationId), any(UUID.class), any(JsonEnvelope.class), eq(null))).thenReturn(getCourtDocument()); + when(courtApplicationService.getProsecutingAuthority(any(UUID.class), any(JsonEnvelope.class))).thenReturn(prosecutingAuthority); + when(courtApplicationService.getProsecutingAuthority(any(UUID.class), any(JsonEnvelope.class), anyBoolean())).thenReturn(cpsProsecutor); + when(requester.requestAsAdmin(any(JsonEnvelope.class))).thenReturn(prosecutionCaseEnvelope(prosecutorId, true)); + + notificationService.sendNotification(envelope, courtApplication, false, courtCentre, hearingDateTime, JurisdictionType.CROWN, false); + + // applicant (email + doc), informant (email + doc), CPS prosecutor (email + doc) + verify(this.sender, times(6)).send(this.envelopeArgumentCaptor.capture()); + + // the CPS prosecutor is emailed on the CPS CC email address + assertThat(this.envelopeArgumentCaptor.getAllValues().get(4), jsonEnvelope(metadata().withName(PROGRESSION_COMMAND_EMAIL), payloadIsJson(allOf( + withJsonPath("$.applicationId", equalTo(applicationId.toString())), + withJsonPath("$.notifications[0].sendToAddress", equalTo("cc@cps.gov.uk")))))); + } + + private JsonEnvelope prosecutionCaseEnvelope(final UUID prosecutorId, final boolean isCps) { + final JsonObject payload = createObjectBuilder() + .add("prosecutionCase", createObjectBuilder() + .add("prosecutor", createObjectBuilder() + .add("prosecutorId", prosecutorId.toString()) + .add("isCps", isCps))) + .build(); + return envelopeFrom(metadataWithRandomUUIDAndName(), payload); + } + + private static List getCourtApplicationCasesWithCaseId(final UUID caseId, final UUID prosecutionAuthorityId) { + return singletonList(courtApplicationCase() + .withProsecutionCaseId(caseId) + .withProsecutionCaseIdentifier(prosecutionCaseIdentifier() + .withProsecutionAuthorityId(prosecutionAuthorityId) + .withProsecutionAuthorityCode("ouCode") + .build()) + .withIsSJP(true) + .withCaseStatus("ACTIVE") + .build()); + } + private static CourtDocument getCourtDocument() { return CourtDocument.courtDocument() .withCourtDocumentId(randomUUID()) diff --git a/progression-eventprocessorstore/pom.xml b/progression-eventprocessorstore/pom.xml index cccf3378a7..88db1cba47 100644 --- a/progression-eventprocessorstore/pom.xml +++ b/progression-eventprocessorstore/pom.xml @@ -3,7 +3,7 @@ progression-parent uk.gov.moj.cpp.progression - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 progression-eventprocessorstore diff --git a/progression-eventprocessorstore/progression-eventprocessorstore-liquibase/pom.xml b/progression-eventprocessorstore/progression-eventprocessorstore-liquibase/pom.xml index 1725342ac1..63cff3203b 100644 --- a/progression-eventprocessorstore/progression-eventprocessorstore-liquibase/pom.xml +++ b/progression-eventprocessorstore/progression-eventprocessorstore-liquibase/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-eventprocessorstore - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 progression-eventprocessorstore-liquibase diff --git a/progression-eventprocessorstore/progression-eventprocessorstore-persistence/pom.xml b/progression-eventprocessorstore/progression-eventprocessorstore-persistence/pom.xml index 7d57d9712c..70b0384f3a 100644 --- a/progression-eventprocessorstore/progression-eventprocessorstore-persistence/pom.xml +++ b/progression-eventprocessorstore/progression-eventprocessorstore-persistence/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-eventprocessorstore - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 progression-eventprocessorstore-persistence diff --git a/progression-healthchecks/pom.xml b/progression-healthchecks/pom.xml index 476c8e8e02..f33bb66a6f 100644 --- a/progression-healthchecks/pom.xml +++ b/progression-healthchecks/pom.xml @@ -3,7 +3,7 @@ progression-parent uk.gov.moj.cpp.progression - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 diff --git a/progression-integration-test/pom.xml b/progression-integration-test/pom.xml index de9ba2386d..d3a894b5b9 100644 --- a/progression-integration-test/pom.xml +++ b/progression-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT false diff --git a/progression-integration-test/src/test/java/uk/gov/moj/cpp/progression/SendAppealNotificationToCpsProsecutorIT.java b/progression-integration-test/src/test/java/uk/gov/moj/cpp/progression/SendAppealNotificationToCpsProsecutorIT.java new file mode 100644 index 0000000000..d2fb82a303 --- /dev/null +++ b/progression-integration-test/src/test/java/uk/gov/moj/cpp/progression/SendAppealNotificationToCpsProsecutorIT.java @@ -0,0 +1,247 @@ +package uk.gov.moj.cpp.progression; + +import static com.jayway.jsonpath.matchers.JsonPathMatchers.withJsonPath; +import static java.time.LocalDateTime.now; +import static java.util.Collections.singletonList; +import static java.util.UUID.randomUUID; +import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric; +import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.notNullValue; +import static uk.gov.justice.services.integrationtest.utils.jms.JmsMessageProducerClientProvider.newPublicJmsMessageProducerClientProvider; +import static uk.gov.justice.services.messaging.JsonEnvelope.envelopeFrom; +import static uk.gov.justice.services.messaging.JsonEnvelope.metadataBuilder; +import static uk.gov.justice.services.test.utils.core.random.RandomGenerator.PAST_LOCAL_DATE; +import static uk.gov.justice.services.test.utils.core.random.RandomGenerator.POST_CODE; +import static uk.gov.justice.services.test.utils.core.random.RandomGenerator.STRING; +import static uk.gov.moj.cpp.progression.helper.CaseHearingsQueryHelper.pollForHearing; +import static uk.gov.moj.cpp.progression.helper.PreAndPostConditionHelper.addCourtApplicationForApplicationAtAGlance; +import static uk.gov.moj.cpp.progression.helper.PreAndPostConditionHelper.addProsecutionCaseToCrownCourt; +import static uk.gov.moj.cpp.progression.helper.PreAndPostConditionHelper.getApplicationFor; +import static uk.gov.moj.cpp.progression.helper.PreAndPostConditionHelper.pollCaseAndGetHearingForDefendant; +import static uk.gov.moj.cpp.progression.helper.PreAndPostConditionHelper.pollProsecutionCasesWithCourtOrdersFor; +import static uk.gov.moj.cpp.progression.helper.PreAndPostConditionHelper.sendNotification; +import static uk.gov.moj.cpp.progression.helper.StubUtil.setupLoggedInUsersPermissionQueryStub; +import static uk.gov.moj.cpp.progression.stub.DefenceStub.stubForAssociatedOrganisation; +import static uk.gov.moj.cpp.progression.stub.NotificationServiceStub.verifyEmailNotificationIsRaisedWithAttachment; +import static uk.gov.moj.cpp.progression.stub.ReferenceDataStub.stubQueryProsecutorDataForGivenProsecutionAuthorityId; + +import uk.gov.justice.services.common.converter.StringToJsonObjectConverter; +import uk.gov.justice.services.integrationtest.utils.jms.JmsMessageProducerClient; +import uk.gov.justice.services.messaging.JsonEnvelope; +import uk.gov.moj.cpp.progression.util.CaseProsecutorUpdateHelper; + +import java.time.LocalDate; + +import javax.json.JsonObject; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * Verifies that when a notification is sent for an appeal court application, the CPS prosecutor currently on the + * linked prosecution case is emailed on its CPS CC email address. + *

+ * The flow exercised is: + *

    + *
  1. A prosecution case is created, a hearing confirmed, and its prosecutor is updated to a CPS prosecutor + * ({@code prosecutor.isCps == true}).
  2. + *
  3. An appeal court application is initiated ({@code type.appealFlag == true}) linked to that case, so the + * application aggregate holds the {@code CourtApplicationProceedingsInitiated} state that + * {@code ApplicationAggregate.sendNotificationForApplication} requires.
  4. + *
  5. An appeal application notification is raised. {@code NotificationService#sendNotificationToProsecutor} + * resolves the current prosecutor via {@code getCurrentProsecutor}, which issues the internal + * {@code progression.query.prosecutioncase} query and reads {@code prosecutor.prosecutorId} / + * {@code prosecutor.isCps}.
  6. + *
  7. Because the prosecutor is a CPS prosecutor, {@code CourtApplicationService#getProsecutingAuthority} + * is called with {@code isCps == true} and the CPS CC email address is used as the recipient.
  8. + *
+ */ +public class SendAppealNotificationToCpsProsecutorIT extends AbstractIT { + + // Must match the "prosecutionAuthorityId" in progression.update-cps-prosecutor-details.json - this is the + // prosecutorId that CaseProsecutorUpdateHelper stamps onto the case as the CPS prosecutor. + private static final String CPS_PROSECUTOR_ID = "df73207f-3ced-488a-82a0-3fba79c2ce95"; + private static final String CPS_PROSECUTOR_OU_CODE = "B01EF01"; + private static final String CPS_CC_EMAIL_ADDRESS = "cps-cc@cps.gov.uk"; + private static final String CPS_PROSECUTOR_REF_DATA = "restResource/referencedata.query.cps.prosecutor.with.cc.email.json"; + private static final String CREATE_COURT_APPLICATION_JSON = "progression.command.create-court-application-send-notification.json"; + private static final String SEND_NOTIFICATION_JSON = "progression.command.send-notification-for-application.json"; + private static final String HEARING_CONFIRMED_EVENT = "public.listing.hearing-confirmed"; + private static final String HEARING_CONFIRMED_JSON = "public.listing.hearing-confirmed-for-group-cases.json"; + + private final JmsMessageProducerClient messageProducerClientPublic = + newPublicJmsMessageProducerClientProvider().getMessageProducerClient(); + private final StringToJsonObjectConverter stringToJsonObjectConverter = new StringToJsonObjectConverter(); + + private String userId; + private String caseId; + private String defendantId; + private String courtCentreId; + private String hearingId; + private String parentApplicationId; + private String applicationId; + private String respondentDefendantId; + // The informant authority is a different id to the CPS prosecutor so the prosecutor notification is not + // de-duplicated against the informant notification. + private String informantAuthorityId; + + @BeforeEach + public void setUp() { + userId = randomUUID().toString(); + caseId = randomUUID().toString(); + defendantId = randomUUID().toString(); + courtCentreId = randomUUID().toString(); + parentApplicationId = randomUUID().toString(); + applicationId = randomUUID().toString(); + respondentDefendantId = randomUUID().toString(); + informantAuthorityId = randomUUID().toString(); + + setupLoggedInUsersPermissionQueryStub(); + stubForAssociatedOrganisation("stub-data/defence.get-associated-organisation.json", respondentDefendantId); + + // Reference-data lookup for the CPS prosecutor returns a response carrying a CPS CC email address. This is + // registered against the specific CPS prosecutor id so the informant (a different authority) still resolves + // via the default prosecutor stub. + stubQueryProsecutorDataForGivenProsecutionAuthorityId(CPS_PROSECUTOR_REF_DATA, CPS_PROSECUTOR_ID, CPS_PROSECUTOR_OU_CODE); + } + + @Test + public void shouldEmailCpsProsecutorOnCpsCcEmailAddressWhenAppealApplicationNotificationSent() throws Exception { + // Given a prosecution case whose current prosecutor is a CPS prosecutor + addProsecutionCaseToCrownCourt(caseId, defendantId); + pollProsecutionCasesWithCourtOrdersFor(caseId, withJsonPath("$.prosecutionCase.id", equalTo(caseId))); + hearingId = pollCaseAndGetHearingForDefendant(caseId, defendantId); + confirmHearing(); + + new CaseProsecutorUpdateHelper(caseId).updateCaseProsecutor(); + pollProsecutionCasesWithCourtOrdersFor(caseId, + withJsonPath("$.prosecutionCase.prosecutor.prosecutorId", equalTo(CPS_PROSECUTOR_ID)), + withJsonPath("$.prosecutionCase.prosecutor.isCps", is(true))); + + // And an appeal court application linked to that case has been initiated (so the application aggregate holds + // the proceedings-initiated state required for send-notification to be actioned rather than ignored). + initiateAppealCourtApplication(parentApplicationId, null); + initiateAppealCourtApplication(applicationId, parentApplicationId); + + // When an appeal application notification is raised for that case + sendAppealApplicationNotification(); + + // Then the CPS prosecutor is emailed on its CPS CC email address + verifyEmailNotificationIsRaisedWithAttachment(singletonList(CPS_CC_EMAIL_ADDRESS)); + } + + private void confirmHearing() { + final String payload = getHearingPayload(); + final JsonEnvelope publicEventEnvelope = envelopeFrom(metadataBuilder() + .withId(randomUUID()) + .withName(HEARING_CONFIRMED_EVENT) + .withUserId(userId) + .build(), + stringToJsonObjectConverter.convert(payload)); + messageProducerClientPublic.sendMessage(HEARING_CONFIRMED_EVENT, publicEventEnvelope); + + pollForHearing(hearingId, withJsonPath("$.hearing.id", is(hearingId))); + } + + private String getHearingPayload() { + return uk.gov.moj.cpp.progression.util.FileUtil.getPayload(HEARING_CONFIRMED_JSON) + .replaceAll("CASE_ID", caseId) + .replaceAll("HEARING_ID", hearingId) + .replaceAll("DEFENDANT_ID", defendantId) + .replaceAll("COURT_CENTRE_ID", courtCentreId); + } + + private void initiateAppealCourtApplication(final String courtApplicationId, final String parentApplicationId) { + addCourtApplicationForApplicationAtAGlance(caseId, + courtApplicationId, + STRING.next(), // particulars + now().toLocalDate().toString(), // applicantReceivedDate + STRING.next(), // applicationType + Boolean.TRUE, // appeal + Boolean.FALSE, // applicantAppellantFlag + STRING.next(), // paymentReference + STRING.next(), // applicantSynonym + STRING.next(), // applicantFirstName + STRING.next(), // applicantLastName + STRING.next(), // applicantNationality + STRING.next(), // applicantRemandStatus + STRING.next(), // applicantRepresentation + STRING.next(), // interpreterLanguageNeeds + PAST_LOCAL_DATE.next(), // applicantDoB + STRING.next(), // applicantAddress1 + STRING.next(), // applicantAddress2 + STRING.next(), // applicantAddress3 + STRING.next(), // applicantAddress4 + STRING.next(), // applicantAddress5 + POST_CODE.next(), // applicantPostCode + randomAlphanumeric(4).toUpperCase() + randomNumeric(7), // applicationReference + respondentDefendantId, + STRING.next(), // respondentOrganisationName + STRING.next(), // respondentOrganisationAddress1 + STRING.next(), // respondentOrganisationAddress2 + STRING.next(), // respondentOrganisationAddress3 + STRING.next(), // respondentOrganisationAddress4 + STRING.next(), // respondentOrganisationAddress5 + POST_CODE.next(), // respondentOrganisationPostcode + STRING.next(), // respondentRepresentativeFirstName + STRING.next(), // respondentRepresentativeLastName + STRING.next(), // respondentRepresentativePosition + caseId, // prosecutionCaseId (linked case == seeded case) + informantAuthorityId, // prosecutionAuthorityId (informant) + STRING.next(), // prosecutionAuthorityCode + STRING.next(), // prosecutionAuthorityReference + parentApplicationId, + CREATE_COURT_APPLICATION_JSON); + + assertThat(getApplicationFor(courtApplicationId), is(notNullValue())); + } + + private void sendAppealApplicationNotification() { + // The notification is raised for the initiated application; the aggregate resolves the current (CPS) + // prosecutor of the linked case and emails it on the CPS CC email address. + sendNotification(caseId, + applicationId, + STRING.next(), // particulars + now().toLocalDate().toString(), // applicantReceivedDate + STRING.next(), // applicationType + Boolean.TRUE, // appeal + Boolean.FALSE, // applicantAppellantFlag + STRING.next(), // paymentReference + STRING.next(), // applicantSynonym + STRING.next(), // applicantFirstName + STRING.next(), // applicantLastName + STRING.next(), // applicantNationality + STRING.next(), // applicantRemandStatus + STRING.next(), // applicantRepresentation + STRING.next(), // interpreterLanguageNeeds + PAST_LOCAL_DATE.next(), // applicantDoB + STRING.next(), // applicantAddress1 + STRING.next(), // applicantAddress2 + STRING.next(), // applicantAddress3 + STRING.next(), // applicantAddress4 + STRING.next(), // applicantAddress5 + POST_CODE.next(), // applicantPostCode + randomAlphanumeric(4).toUpperCase() + randomNumeric(7), // applicationReference + STRING.next(), // respondentOrganisationName + STRING.next(), // respondentOrganisationAddress1 + STRING.next(), // respondentOrganisationAddress2 + STRING.next(), // respondentOrganisationAddress3 + STRING.next(), // respondentOrganisationAddress4 + STRING.next(), // respondentOrganisationAddress5 + POST_CODE.next(), // respondentOrganisationPostcode + STRING.next(), // respondentRepresentativeFirstName + STRING.next(), // respondentRepresentativeLastName + STRING.next(), // respondentRepresentativePosition + caseId, // prosecutionCaseId (linked case == seeded case) + informantAuthorityId, // prosecutionAuthorityId (informant) + STRING.next(), // prosecutionAuthorityCode + STRING.next(), // prosecutionAuthorityReference + parentApplicationId, // parentApplicationId + SEND_NOTIFICATION_JSON, + Boolean.FALSE, // isBoxWorkRequest + Boolean.FALSE); // isWelshTranslationRequired + } +} diff --git a/progression-integration-test/src/test/resources/restResource/referencedata.query.cps.prosecutor.with.cc.email.json b/progression-integration-test/src/test/resources/restResource/referencedata.query.cps.prosecutor.with.cc.email.json new file mode 100644 index 0000000000..3fbe03af4b --- /dev/null +++ b/progression-integration-test/src/test/resources/restResource/referencedata.query.cps.prosecutor.with.cc.email.json @@ -0,0 +1,19 @@ +{ + "id": "[PROSECUTION_AUTHORITY_ID]", + "sequenceNumber": 1, + "majorCreditorCode": "CPS2", + "oucode": "[OU_CODE]", + "shortName": "CPS", + "fullName": "CPS West Midlands", + "nameWelsh": "CPS West Midlands", + "cpsFlag": true, + "address": { + "address1": "Colmore Gate", + "address2": "2 Colmore Row", + "address3": "Birmingham", + "postcode": "B3 2QA" + }, + "contactEmailAddress": "cps-contact@cps.gov.uk", + "cpsCcEmailAddress": "cps-cc@cps.gov.uk", + "informantEmailAddress": "cps-informant@cps.gov.uk" +} diff --git a/progression-performance-test/pom.xml b/progression-performance-test/pom.xml index 5432f79ffb..26a62bfc5b 100644 --- a/progression-performance-test/pom.xml +++ b/progression-performance-test/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 diff --git a/progression-query/pom.xml b/progression-query/pom.xml index 9fa8ac4103..c1f77a702c 100644 --- a/progression-query/pom.xml +++ b/progression-query/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-query pom diff --git a/progression-query/progression-query-api/pom.xml b/progression-query/progression-query-api/pom.xml index fb3acfb024..e67809d197 100644 --- a/progression-query/progression-query-api/pom.xml +++ b/progression-query/progression-query-api/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-query - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-query-api war diff --git a/progression-query/progression-query-view/pom.xml b/progression-query/progression-query-view/pom.xml index 7bbbc3bad1..1873437541 100644 --- a/progression-query/progression-query-view/pom.xml +++ b/progression-query/progression-query-view/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-query - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-query-view jar diff --git a/progression-refdata-service/pom.xml b/progression-refdata-service/pom.xml index ca43e44b4c..7ed09ad19a 100644 --- a/progression-refdata-service/pom.xml +++ b/progression-refdata-service/pom.xml @@ -7,7 +7,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT diff --git a/progression-service/pom.xml b/progression-service/pom.xml index c4ebf64fdf..b5da11f98f 100644 --- a/progression-service/pom.xml +++ b/progression-service/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT 4.0.0 diff --git a/progression-test-utilities/pom.xml b/progression-test-utilities/pom.xml index 3ebb235d87..2268537e9c 100644 --- a/progression-test-utilities/pom.xml +++ b/progression-test-utilities/pom.xml @@ -7,7 +7,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT diff --git a/progression-viewstore/pom.xml b/progression-viewstore/pom.xml index 8603ea41e3..d80c1145e4 100644 --- a/progression-viewstore/pom.xml +++ b/progression-viewstore/pom.xml @@ -3,7 +3,7 @@ uk.gov.moj.cpp.progression progression-parent - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-viewstore pom diff --git a/progression-viewstore/progression-viewstore-liquibase/pom.xml b/progression-viewstore/progression-viewstore-liquibase/pom.xml index 8db7aa01cc..0bdc9d64de 100644 --- a/progression-viewstore/progression-viewstore-liquibase/pom.xml +++ b/progression-viewstore/progression-viewstore-liquibase/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.progression progression-viewstore - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-viewstore-liquibase diff --git a/progression-viewstore/progression-viewstore-persistence/pom.xml b/progression-viewstore/progression-viewstore-persistence/pom.xml index 8ffcf32782..917e5ba9dd 100644 --- a/progression-viewstore/progression-viewstore-persistence/pom.xml +++ b/progression-viewstore/progression-viewstore-persistence/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.progression progression-viewstore - 17.0.276-SNAPSHOT + 17.0.276-CIMD-3986-SNAPSHOT progression-viewstore-persistence