From fabebef5301afb035a00add1b91844a5916d1ab0 Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Mon, 9 Dec 2024 13:56:11 -0700 Subject: [PATCH 1/4] Adjust spacing and size of report --- .../src/main/resources/notice_of_intent_to_repatriate.jrxml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml index c892bfdaa1..c1d45fe16e 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml @@ -1,6 +1,6 @@ - + @@ -492,7 +492,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - + @@ -641,7 +641,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - + From 870ab021d1f18ee60215c33ce851ffcb5db3611e Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Mon, 9 Dec 2024 13:56:53 -0700 Subject: [PATCH 2/4] Get distinct acquisitions --- .../src/main/resources/notice_of_intent_to_repatriate.jrxml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml index c1d45fe16e..f65a1b8fc7 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml @@ -39,8 +39,7 @@ INNER JOIN hierarchy on hierarchy.name = relation.objectcsid WHERE relation.objectdocumenttype = 'CollectionObject' AND relation.subjectdocumenttype = 'SummaryDocumentation' $P!{whereclause_cte} ), related_acquisitions AS ( - SELECT - objs.objectcsid, + SELECT DISTINCT ON (objs.summarycsid, hierarchy.id) objs.objectcsid, objs.summarycsid, hierarchy.id as acquisition_id, relation.subjectcsid as acquisitioncsid From eeb0ac1f9a31a02f843c5105914a7853f4fbe805 Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Mon, 9 Dec 2024 14:29:49 -0700 Subject: [PATCH 3/4] Change scripting language to javascript; avoid null betters --- .../notice_of_intent_to_repatriate.jrxml | 70 ++++++++++--------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml index f65a1b8fc7..1a601326b2 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml @@ -1,6 +1,6 @@ - + @@ -18,7 +18,7 @@ - + - + !!name).join('; '); + var donors = $F{acquisition_sources}.getArray().filter(donor => !!donor).join('; '); + var removalDates = $F{dates}.getArray().filter(date => !!date).join('; '); + var accessDates = $F{accession_dates}.getArray().filter(date => !!date).join('; '); + + var objString = 'Archaeological objects including: ' + archObjects + '\n\n'; + var donorString = 'Collector Names: ' + donors + '\n\n'; + var dateString = 'Date(s) Removed From Sites: ' + removalDates + '\n\n'; + var accessString = 'Accession Date(s): ' + accessDates; + objString + donorString + dateString + accessString]]> + - + !!category).join('; ')]]> - + !!place).join('; ')]]> - + !!site).join('; ')]]> @@ -553,37 +559,37 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - + !!method).join('; ')]]> - + !!source).join('; ')]]> - + !!collector).join('; ')]]> - + !!date).join('; ')]]> - + !!number).join('; ')]]> - + !!date).join('; ')]]> @@ -595,7 +601,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - + !!ton).join('; ')]]> @@ -607,7 +613,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - + !!culture).join('; ')]]> @@ -637,7 +643,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - + !!location).join('; ')]]> From 98b5ac4d9bb4890fcfeb841edf97cef56672cf25 Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Thu, 12 Dec 2024 17:55:14 -0700 Subject: [PATCH 4/4] Add parens to arrow functions --- .../notice_of_intent_to_repatriate.jrxml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml index 1a601326b2..2e24dd553b 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml @@ -519,10 +519,10 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!name).join('; '); - var donors = $F{acquisition_sources}.getArray().filter(donor => !!donor).join('; '); - var removalDates = $F{dates}.getArray().filter(date => !!date).join('; '); - var accessDates = $F{accession_dates}.getArray().filter(date => !!date).join('; '); + !!name).join('; '); + var donors = $F{acquisition_sources}.getArray().filter((donor) => !!donor).join('; '); + var removalDates = $F{dates}.getArray().filter((date) => !!date).join('; '); + var accessDates = $F{accession_dates}.getArray().filter((date) => !!date).join('; '); var objString = 'Archaeological objects including: ' + archObjects + '\n\n'; var donorString = 'Collector Names: ' + donors + '\n\n'; @@ -535,19 +535,19 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!category).join('; ')]]> + !!category).join('; ')]]> - !!place).join('; ')]]> + !!place).join('; ')]]> - !!site).join('; ')]]> + !!site).join('; ')]]> @@ -559,37 +559,37 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!method).join('; ')]]> + !!method).join('; ')]]> - !!source).join('; ')]]> + !!source).join('; ')]]> - !!collector).join('; ')]]> + !!collector).join('; ')]]> - !!date).join('; ')]]> + !!date).join('; ')]]> - !!number).join('; ')]]> + !!number).join('; ')]]> - !!date).join('; ')]]> + !!date).join('; ')]]> @@ -601,7 +601,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!ton).join('; ')]]> + !!ton).join('; ')]]> @@ -613,7 +613,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!culture).join('; ')]]> + !!culture).join('; ')]]> @@ -643,7 +643,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!location).join('; ')]]> + !!location).join('; ')]]>