]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
Notice Intent Reports: Update Queries (#434)
authorMichael Ritter <mikejritter@users.noreply.github.com>
Tue, 3 Dec 2024 20:16:26 +0000 (13:16 -0700)
committerGitHub <noreply@github.com>
Tue, 3 Dec 2024 20:16:26 +0000 (13:16 -0700)
* Use parens in query for involved parties
* Use regex to match word boundary for object count type associated

services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_intent_to_repatriate.jrxml
services/report/3rdparty/jasper-cs-report/src/main/resources/notice_of_inventory_completion.jrxml

index a840f6f4555c0d0dbfa90403986fb8041d6809ec..c892bfdaa1ca75c9bfcf5e3ce2832b4cb341103b 100644 (file)
@@ -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
index 6439359a3116027fe296837f9f4352cc3a9b1f22..bd41864d0b64befd691bbfe9a933342d9679b210 100644 (file)
@@ -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