Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-parent</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion sjp-command/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sjp-command/sjp-command-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-command</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-command/sjp-command-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-command</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-command/sjp-command-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-command</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-parent</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<artifactId>sjp-domain</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/sjp-domain-aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-domain</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<artifactId>sjp-domain-aggregate</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/sjp-domain-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-domain</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/sjp-domain-event-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-domain</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/sjp-domain-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-domain</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<artifactId>sjp-domain-event</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/sjp-domain-prosecution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>sjp-domain</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<artifactId>sjp-domain-prosecution</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sjp-domain/sjp-domain-transformation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-domain</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-domain-transformation</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-domain-transformation</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-event-sources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sjp-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sjp-event/sjp-event-indexer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-event</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-event/sjp-event-listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-event</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-event/sjp-event-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-event</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import uk.gov.justice.services.messaging.JsonEnvelope;
import uk.gov.moj.cpp.sjp.domain.decision.Dismiss;
import uk.gov.moj.cpp.sjp.domain.decision.OffenceDecision;
import uk.gov.moj.cpp.sjp.event.processor.results.converter.ConvictionInfo;
import uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.JCachedReferenceData;
import uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.DecisionAggregate;

Expand Down Expand Up @@ -49,6 +50,13 @@ public void aggregate(final OffenceDecision offenceDecision,

setFinalOffence(decisionAggregate, offenceId, judicialResults);

// conviction information - a dismissal carries the FOUND_NOT_GUILTY verdict but has no
// conviction date or convicting court
decisionAggregate.putConvictionInfo(offenceId,
new ConvictionInfo(offenceId,
dismissOffenceDecision.getOffenceDecisionInformation().getVerdict(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the event have the verdict information?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please check the schema end to end of these 2 fields are mandatory anywhere ?

dismissOffenceDecision.getConvictionDate(),
null));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import static org.hamcrest.Matchers.hasProperty;
import static org.hamcrest.MatcherAssert.assertThat;
import static uk.gov.moj.cpp.sjp.domain.decision.OffenceDecisionInformation.createOffenceDecisionInformation;
import static uk.gov.moj.cpp.sjp.domain.verdict.VerdictType.FOUND_GUILTY;
import static uk.gov.moj.cpp.sjp.domain.verdict.VerdictType.FOUND_NOT_GUILTY;
import static uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.JCaseResultsConstants.DATE_FORMAT;

import uk.gov.moj.cpp.sjp.domain.decision.Dismiss;
import uk.gov.moj.cpp.sjp.event.processor.results.converter.ConvictionInfo;
import uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.DecisionAggregate;

import org.hamcrest.Matchers;
Expand All @@ -37,7 +38,7 @@ public void setUp() {
@Test
public void shouldPopulateResultWithRightPrompts() {
final Dismiss offenceDecision
= new Dismiss(null, createOffenceDecisionInformation(offence1Id, FOUND_GUILTY));
= new Dismiss(null, createOffenceDecisionInformation(offence1Id, FOUND_NOT_GUILTY));

aggregator.aggregate(offenceDecision, sjpSessionEnvelope, resultsAggregate, resultedOn);

Expand All @@ -49,4 +50,19 @@ public void shouldPopulateResultWithRightPrompts() {
hasProperty("judicialResultPrompts", is(nullValue()))))));
assertThat(resultsAggregate.getFinalOffence(offenceDecision.getOffenceIds().get(0)),Matchers.is(true));
}

@Test
public void shouldPopulateConvictionInfoWithFoundNotGuiltyVerdict() {
final Dismiss offenceDecision
= new Dismiss(null, createOffenceDecisionInformation(offence1Id, FOUND_NOT_GUILTY));

aggregator.aggregate(offenceDecision, sjpSessionEnvelope, resultsAggregate, resultedOn);

final ConvictionInfo convictionInfo = resultsAggregate.getConvictionInfo(offence1Id);
assertThat(convictionInfo, is(Matchers.notNullValue()));
assertThat(convictionInfo.getOffenceId(), Matchers.is(offence1Id));
assertThat(convictionInfo.getVerdictType(), Matchers.is(FOUND_NOT_GUILTY));
assertThat(convictionInfo.getConvictionDate(), is(nullValue()));
assertThat(convictionInfo.getConvictingCourt(), is(nullValue()));
}
}
2 changes: 1 addition & 1 deletion sjp-healthchecks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-parent</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sjp-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-query/sjp-query-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-query</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-query/sjp-query-view/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-query</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sjp-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-parent</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<artifactId>sjp-service</artifactId>
<packaging>war</packaging>
Expand Down
2 changes: 1 addition & 1 deletion sjp-viewstore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-parent</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sjp-viewstore</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sjp-viewstore/sjp-viewstore-liquibase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<artifactId>sjp-viewstore</artifactId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>

<artifactId>sjp-viewstore-liquibase</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sjp-viewstore/sjp-viewstore-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sjp-viewstore</artifactId>
<groupId>uk.gov.moj.cpp.sjp</groupId>
<version>17.104.182-SNAPSHOT</version>
<version>17.104.182-CIMD-3915-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading