From 12e0b4914e9521f564871b3547a7a6333ca8e329 Mon Sep 17 00:00:00 2001 From: Alex White Date: Thu, 1 Mar 2018 23:56:15 -0600 Subject: [PATCH] 1.3.0 Release (#83) - Update REJIS Court Date Handling (Trello 343) - Payable online citations not showing as payable online (Trello 347) - Add new REJIS municipalities: Clayton, Valley Park, Maplewood, St John, and Sycamore Hills (Trello 357 & 366) --- pom.xml | 2 +- .../rejis/models/RejisPartialCitation.java | 2 +- .../rejis/transformers/RejisCitationTransformer.java | 2 +- .../2018-02-05_Add_Clayton_ValleyPark_Maplewood.sql | 11 +++++++++++ .../changelog/2018-02-28_Add_StJohn_SycamoreHills.sql | 7 +++++++ .../changelog/2018-02-28_Sycamore_Hills_update.sql | 3 +++ .../transformers/RejisCitationTransformerTest.java | 9 +++++++-- 7 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/sql/changelog/2018-02-05_Add_Clayton_ValleyPark_Maplewood.sql create mode 100644 src/main/resources/sql/changelog/2018-02-28_Add_StJohn_SycamoreHills.sql create mode 100644 src/main/resources/sql/changelog/2018-02-28_Sycamore_Hills_update.sql diff --git a/pom.xml b/pom.xml index ba2a68e..d348652 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.civtechstl - 1.2.0 + 1.3.0 jar diff --git a/src/main/java/svc/data/citations/datasources/rejis/models/RejisPartialCitation.java b/src/main/java/svc/data/citations/datasources/rejis/models/RejisPartialCitation.java index bef385e..47aab27 100644 --- a/src/main/java/svc/data/citations/datasources/rejis/models/RejisPartialCitation.java +++ b/src/main/java/svc/data/citations/datasources/rejis/models/RejisPartialCitation.java @@ -45,7 +45,7 @@ public class RejisPartialCitation { @JsonProperty("BalDue") public double balanceDue; - @JsonProperty("ShowIPaycourt") + @JsonProperty("ShowIpaycourt") public boolean showIpaycourt; } diff --git a/src/main/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformer.java b/src/main/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformer.java index 3df25b7..1ab84b5 100644 --- a/src/main/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformer.java +++ b/src/main/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformer.java @@ -62,7 +62,7 @@ public Citation fromRejisFullCitation(RejisFullCitation rejisFullCitation, Rejis LocalDateTime NextDktDate = LocalDateTime.parse(rejisFullCitation.nextCourtDate); LocalDateTime OrigDktDate = LocalDateTime.parse(rejisFullCitation.originalCourtDate); if (NextDktDate.isBefore(OrigDktDate)){ - genericCitation.court_dateTime = OrigDktDate; + genericCitation.court_dateTime = null; }else{ genericCitation.court_dateTime = NextDktDate; } diff --git a/src/main/resources/sql/changelog/2018-02-05_Add_Clayton_ValleyPark_Maplewood.sql b/src/main/resources/sql/changelog/2018-02-05_Add_Clayton_ValleyPark_Maplewood.sql new file mode 100644 index 0000000..24b0d3f --- /dev/null +++ b/src/main/resources/sql/changelog/2018-02-05_Add_Clayton_ValleyPark_Maplewood.sql @@ -0,0 +1,11 @@ +INSERT INTO citation_datasource_municipality (citation_datasource_id,municipality_id) VALUES (2,17); #Clayton +INSERT INTO datasource_municipality_mapping (citation_datasource_id,municipality_id,datasource_municipality_identifier) VALUES (2,17,'CL'); #Clayton +INSERT INTO rejis_court_mapping (court_id,rejis_court_identifier) VALUES (17,'CL'); #Clayton + +INSERT INTO citation_datasource_municipality (citation_datasource_id,municipality_id) VALUES (2,77); #Valley Park +INSERT INTO datasource_municipality_mapping (citation_datasource_id,municipality_id,datasource_municipality_identifier) VALUES (2,77,'VP'); #Valley Park +INSERT INTO rejis_court_mapping (court_id,rejis_court_identifier) VALUES (68,'VP'); #Valley Park + +INSERT INTO citation_datasource_municipality (citation_datasource_id,municipality_id) VALUES (2,50); #Maplewood +INSERT INTO datasource_municipality_mapping (citation_datasource_id,municipality_id,datasource_municipality_identifier) VALUES (2,50,'MW'); #Maplewood +INSERT INTO rejis_court_mapping (court_id,rejis_court_identifier) VALUES (46,'MW'); #Maplewood \ No newline at end of file diff --git a/src/main/resources/sql/changelog/2018-02-28_Add_StJohn_SycamoreHills.sql b/src/main/resources/sql/changelog/2018-02-28_Add_StJohn_SycamoreHills.sql new file mode 100644 index 0000000..85bd45a --- /dev/null +++ b/src/main/resources/sql/changelog/2018-02-28_Add_StJohn_SycamoreHills.sql @@ -0,0 +1,7 @@ +INSERT INTO citation_datasource_municipality (citation_datasource_id,municipality_id) VALUES (2,70); #St John +INSERT INTO datasource_municipality_mapping (citation_datasource_id,municipality_id,datasource_municipality_identifier) VALUES (2,70,'SJ'); #St John +INSERT INTO rejis_court_mapping (court_id,rejis_court_identifier) VALUES (64,'SJ'); #St John + +INSERT INTO citation_datasource_municipality (citation_datasource_id,municipality_id) VALUES (2,72); #Sycamore Hills +INSERT INTO datasource_municipality_mapping (citation_datasource_id,municipality_id,datasource_municipality_identifier) VALUES (2,72,'SY'); #Sycamore Hills +INSERT INTO rejis_court_mapping (court_id,rejis_court_identifier) VALUES (64,'SY'); #Sycamore Hills \ No newline at end of file diff --git a/src/main/resources/sql/changelog/2018-02-28_Sycamore_Hills_update.sql b/src/main/resources/sql/changelog/2018-02-28_Sycamore_Hills_update.sql new file mode 100644 index 0000000..c0ecac7 --- /dev/null +++ b/src/main/resources/sql/changelog/2018-02-28_Sycamore_Hills_update.sql @@ -0,0 +1,3 @@ +UPDATE municipality +SET payment_url='https://www.ncourt.com/x-press/x-onlinepayments.aspx?juris=71A21A7B-4F4D-4692-912E-FF780549415E' +WHERE municipality_id='72'; \ No newline at end of file diff --git a/src/test/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformerTest.java b/src/test/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformerTest.java index 71f71d6..78803af 100644 --- a/src/test/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformerTest.java +++ b/src/test/java/svc/data/citations/datasources/rejis/transformers/RejisCitationTransformerTest.java @@ -156,10 +156,15 @@ public void citationTransformerCorrectlyAssignsCourtDate() { .thenReturn(municipalHashable); RejisFullCitation rejisFullCitation = generateFullRejisCitation(); - rejisFullCitation.originalCourtDate = "2017-10-01T12:30:00"; + rejisFullCitation.originalCourtDate = "2017-08-01T12:30:00"; Citation citation = citationTransformer.fromRejisFullCitation(rejisFullCitation, generatePartialRejisCitation()); - assertEquals(citation.court_dateTime, LocalDateTime.parse(rejisFullCitation.originalCourtDate)); + assertEquals(citation.court_dateTime, LocalDateTime.parse(rejisFullCitation.nextCourtDate)); + + rejisFullCitation.originalCourtDate = "2017-10-01T12:30:00"; + citation = citationTransformer.fromRejisFullCitation(rejisFullCitation, generatePartialRejisCitation()); + + assertNull(citation.court_dateTime); } }