diff --git a/pom.xml b/pom.xml
index aafb5cf4f..8d1f0f3af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
uk.gov.moj.cpp.results
results-parent
- 17.104.111-SNAPSHOT
+ 17.104.111-CIMD-3868-SNAPSHOT
pom
Results Service - Parent Module
diff --git a/results-command/pom.xml b/results-command/pom.xml
index f543b87b2..555004cac 100644
--- a/results-command/pom.xml
+++ b/results-command/pom.xml
@@ -4,7 +4,7 @@
uk.gov.moj.cpp.results
results-parent
- 17.104.111-SNAPSHOT
+ 17.104.111-CIMD-3868-SNAPSHOT
results-command
pom
diff --git a/results-command/results-command-api/pom.xml b/results-command/results-command-api/pom.xml
index 3e4e1ba3f..c2222307a 100644
--- a/results-command/results-command-api/pom.xml
+++ b/results-command/results-command-api/pom.xml
@@ -3,7 +3,7 @@
uk.gov.moj.cpp.results
results-command
- 17.104.111-SNAPSHOT
+ 17.104.111-CIMD-3868-SNAPSHOT
results-command-api
war
diff --git a/results-command/results-command-handler/pom.xml b/results-command/results-command-handler/pom.xml
index 16b7a02e7..e7d89a446 100644
--- a/results-command/results-command-handler/pom.xml
+++ b/results-command/results-command-handler/pom.xml
@@ -4,7 +4,7 @@
uk.gov.moj.cpp.results
results-command
- 17.104.111-SNAPSHOT
+ 17.104.111-CIMD-3868-SNAPSHOT
results-command-handler
war
diff --git a/results-command/results-command-handler/src/main/java/uk/gov/moj/cpp/results/command/handler/ResultsCommandHandler.java b/results-command/results-command-handler/src/main/java/uk/gov/moj/cpp/results/command/handler/ResultsCommandHandler.java
index bb6073298..99f103977 100644
--- a/results-command/results-command-handler/src/main/java/uk/gov/moj/cpp/results/command/handler/ResultsCommandHandler.java
+++ b/results-command/results-command-handler/src/main/java/uk/gov/moj/cpp/results/command/handler/ResultsCommandHandler.java
@@ -101,6 +101,8 @@ public class ResultsCommandHandler extends AbstractCommandHandler {
private static final String A_4 = "A4";
private static final String ZERO_FOUR = "04";
private static final String CONTACT_EMAIL_ADDRESS = "contactEmailAddress";
+ private static final String CPS_FLAG = "cpsFlag";
+ private static final String CPS_CC_EMAIL_ADDRESS = "cpsCcEmailAddress";
@Inject
private ObjectToJsonObjectConverter objectToJsonObjectConverter;
@@ -352,7 +354,7 @@ private void createAppealUpdateEmail(final JsonEnvelope commandEnvelope, final O
final String[] emailAddress = new String[1];
refDataProsecutorJson.ifPresent(prosecutorJson ->
- emailAddress[0] = getEmailAddress(prosecutorJson, jurisdictionType)
+ emailAddress[0] = getAppealUpdateEmailAddress(prosecutorJson, jurisdictionType)
);
if (emailAddress[0] != null && !emailAddress[0].isBlank()) {
@@ -638,6 +640,21 @@ private String getEmailAddress(final JsonObject prosecutorJson, final Optional jurisdictionType) {
+ if (getFlagValue(CPS_FLAG, prosecutorJson)) {
+ final String cpsCcEmailAddress = prosecutorJson.getString(CPS_CC_EMAIL_ADDRESS, null);
+ if (cpsCcEmailAddress != null && !cpsCcEmailAddress.isBlank()) {
+ return cpsCcEmailAddress;
+ }
+ }
+ return getEmailAddress(prosecutorJson, jurisdictionType);
+ }
+
private void appendEventsToStream(final Envelope> envelope, final EventStream eventStream, final Stream