From a48bda8baaa8ec09a5bbc0a545d68e4f4f6a93f2 Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Tue, 7 Jan 2025 12:02:34 -0700 Subject: [PATCH 1/2] DRYD-1608: Use coalesce to avoid null error --- .../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 5c1e66a0fc..b3dcf25aa6 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 @@ -56,9 +56,9 @@ SELECT coalesce(affiliation.tribeornation, '{}') AS tribeornation, affiliation.basisofdetermination, coalesce(culturalgroup.culture, '{}') AS culture, - partiesinvolved.involvedparty as involved_party, - partiesinvolved.title as involved_party_title, - partiesinvolved.email as involved_party_email, + coalesce(partiesinvolved.involvedparty, '{}') as involved_party, + coalesce(partiesinvolved.title, '{}') as involved_party_title, + coalesce(partiesinvolved.email, '{}') as involved_party_email, statusgroup.status, coalesce(field_collection_places.places, '{}') AS places, coalesce(field_collection_sites.sites, '{}') AS sites, From ba85aafb8954b59f2433e9df6a1958b2fdcdb40a Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Tue, 7 Jan 2025 14:22:43 -0700 Subject: [PATCH 2/2] Add controlled object names --- .../resources/notice_of_intent_to_repatriate.jrxml | 10 ++++++++-- 1 file changed, 8 insertions(+), 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 b3dcf25aa6..67e3d3237f 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 @@ -13,7 +13,7 @@ - + @@ -67,6 +67,7 @@ SELECT coalesce(nagpra_category_determinations.category_determinations, '{}') AS category_determinations, coalesce(object_data.locations, '{}') AS locations, object_count.object_count, + coalesce(object_name.controlled_object_names, '{}') AS controlled_object_names, coalesce(object_name.object_names, '{}') AS object_names, coalesce(acquisition_data.acquisition_numbers, '{}') AS acquisition_numbers, coalesce(acquisition_data.acquisition_methods, '{}') AS acquisition_methods, @@ -151,6 +152,7 @@ FROM hierarchy summary_hierarchy ) object_count ON object_count.summarycsid = summary_hierarchy.name LEFT JOIN LATERAL ( SELECT related_objects.summarycsid, + array_agg(ong.objectnamecontrolled) as controlled_object_names, array_agg(ong.objectname) as object_names FROM hierarchy ong_hierarchy INNER JOIN related_objects on related_objects.object_id = ong_hierarchy.parentid @@ -299,6 +301,10 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> + + + + @@ -515,7 +521,7 @@ WHERE summary_hierarchy.primarytype = 'SummaryDocumentation' $P!{whereclause}]]> - !!name).join('; '); + !!name).join('; '); var collectors = $F{collectors}.getArray().filter((collector) => !!collector).join('; '); var donors = $F{acquisition_sources}.getArray().filter((donor) => !!donor).join('; '); var removalDates = $F{dates}.getArray().filter((date) => !!date).join('; ');