From 5efa415a4fb13bde61e3e6f913b3b0a9f14f8e8c Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Tue, 3 Dec 2024 13:16:26 -0700 Subject: [PATCH] Notice Intent Reports: Update Queries (#434) * Use parens in query for involved parties * Use regex to match word boundary for object count type associated --- .../src/main/resources/notice_of_intent_to_repatriate.jrxml | 2 +- .../src/main/resources/notice_of_inventory_completion.jrxml | 2 +- 2 files changed, 2 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 a840f6f45..c892bfdaa 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 @@ -87,7 +87,7 @@ FROM hierarchy summary_hierarchy email.email FROM hierarchy INNER JOIN partiesinvolvedgroup party ON party.id = hierarchy.id AND - party.involvedrole LIKE '%lineal_descendant%' OR party.involvedrole LIKE '%tribal_rep%' + (party.involvedrole LIKE '%lineal_descendant%' OR party.involvedrole LIKE '%tribal_rep%') INNER JOIN persons_common person ON person.shortidentifier = substring(party.involvedparty FROM '^urn:.*item:name\(([^)]+)\)') INNER JOIN hierarchy person_hierarchy ON person_hierarchy.id = person.id INNER JOIN hierarchy ptg_hierarchy ON ptg_hierarchy.parentid = person.id AND ptg_hierarchy.pos = 0 diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_inventory_completion.jrxml b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_inventory_completion.jrxml index 6439359a3..bd41864d0 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_inventory_completion.jrxml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_inventory_completion.jrxml @@ -141,7 +141,7 @@ FROM hierarchy SELECT ocg_hierarchy.parentid, sum(ocg.objectcount) AS object_count_afo FROM hierarchy ocg_hierarchy - INNER JOIN objectcountgroup ocg ON ocg.id = ocg_hierarchy.id AND ocg.objectcounttype LIKE '%associated%' + INNER JOIN objectcountgroup ocg ON ocg.id = ocg_hierarchy.id AND ocg.objectcounttype ~ '\yassociated' WHERE ocg_hierarchy.name = 'collectionobjects_common:objectCountGroupList' GROUP BY ocg_hierarchy.parentid ) object_count_afo ON object_count_afo.parentid = relation.objectcsid -- 2.47.3