From fc5d0b2ab145cfcc45138a9660c053aff63b2375 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 27 Oct 2020 13:53:58 -0700 Subject: [PATCH 01/12] NOJIRA Bumping UI and BAMPFA plugin versions --- build.properties | 2 +- cspace-ui/bampfa/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index 737e0a8dfd..ff570ad46c 100644 --- a/build.properties +++ b/build.properties @@ -21,7 +21,7 @@ domain.nuxeo=nuxeo-server # UI settings cspace.ui.library.name=cspaceUI -cspace.ui.version=4.0.0-ucb.1 +cspace.ui.version=4.0.0-ucb.2 #nuxeo nuxeo.release=9.10-HF30 diff --git a/cspace-ui/bampfa/build.properties b/cspace-ui/bampfa/build.properties index e38258a11f..22d1b8b50b 100644 --- a/cspace-ui/bampfa/build.properties +++ b/cspace-ui/bampfa/build.properties @@ -3,4 +3,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-bampfa tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileBAMPFA -tenant.ui.profile.plugin.version=2.0.0-rc.2 +tenant.ui.profile.plugin.version=2.0.0 From 4e56bfca9135f3806acee7f0996e0099c1c0f928 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 27 Oct 2020 15:05:48 -0700 Subject: [PATCH 02/12] NOJIRA: Bumped UI version --- build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.properties b/build.properties index ff570ad46c..e27987cbae 100644 --- a/build.properties +++ b/build.properties @@ -21,7 +21,7 @@ domain.nuxeo=nuxeo-server # UI settings cspace.ui.library.name=cspaceUI -cspace.ui.version=4.0.0-ucb.2 +cspace.ui.version=4.0.0-ucb.3.rc1 #nuxeo nuxeo.release=9.10-HF30 From 65cc02f5be1cb37df76b4be5637e02226d27ecaa Mon Sep 17 00:00:00 2001 From: cesarvh Date: Wed, 28 Oct 2020 12:03:39 -0700 Subject: [PATCH 03/12] NOJIRA: bumped ui plugin --- build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.properties b/build.properties index e27987cbae..51aefba3ec 100644 --- a/build.properties +++ b/build.properties @@ -21,7 +21,7 @@ domain.nuxeo=nuxeo-server # UI settings cspace.ui.library.name=cspaceUI -cspace.ui.version=4.0.0-ucb.3.rc1 +cspace.ui.version=4.0.0-ucb.3 #nuxeo nuxeo.release=9.10-HF30 From b7c71e3f6591fe92a8ad6e40bf3ef217a6b98196 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 3 Nov 2020 14:23:31 -0800 Subject: [PATCH 04/12] NOJIRA: Bumped UCBG package version to release 2.0.0 --- cspace-ui/ucbg/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspace-ui/ucbg/build.properties b/cspace-ui/ucbg/build.properties index b51defa279..e1d6e03fd3 100644 --- a/cspace-ui/ucbg/build.properties +++ b/cspace-ui/ucbg/build.properties @@ -3,4 +3,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-ucbg tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileUCBG -tenant.ui.profile.plugin.version=2.0.0-rc.10 +tenant.ui.profile.plugin.version=2.0.0 From d2d20a85968ef0db41b3cf64eb807ab372532773 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 17 Nov 2020 15:21:06 -0800 Subject: [PATCH 05/12] NOJIRA: bumping ucjeps ui to 2.0.0 --- cspace-ui/ucjeps/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspace-ui/ucjeps/build.properties b/cspace-ui/ucjeps/build.properties index b00f9e1e10..df5d7ce239 100644 --- a/cspace-ui/ucjeps/build.properties +++ b/cspace-ui/ucjeps/build.properties @@ -3,4 +3,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-ucjeps tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileUCJEPS -tenant.ui.profile.plugin.version=2.0.0-rc.4 +tenant.ui.profile.plugin.version=2.0.0 From 3d0031aa550364bd936facd0fd13fc2d17eecc4d Mon Sep 17 00:00:00 2001 From: cesarvh Date: Wed, 2 Dec 2020 10:57:00 -0800 Subject: [PATCH 06/12] NOJIRA: Bumping pahma UI to v2.0.0 --- cspace-ui/pahma/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspace-ui/pahma/build.properties b/cspace-ui/pahma/build.properties index 893d6894a5..f8c9fbf6db 100644 --- a/cspace-ui/pahma/build.properties +++ b/cspace-ui/pahma/build.properties @@ -3,4 +3,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-pahma tenant.ui.profile.plugin.library.name=cspaceUIPluginProfilePAHMA -tenant.ui.profile.plugin.version=2.0.0-rc.9 +tenant.ui.profile.plugin.version=2.0.0 From aad9627196b3ef907c87ecc07961a9ff67097140 Mon Sep 17 00:00:00 2001 From: Lam Voong Date: Mon, 21 Dec 2020 15:51:42 -0800 Subject: [PATCH 07/12] CC-1478 and CC1509: pre-deploy scripts for v6.0.6 --- .../post-init/06_nagpra-collectionobject.sql | 87 +++++++++++++++++++ .../upgrade/6.0.0/post-init/07_exhibition.sql | 58 +++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql create mode 100644 src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql diff --git a/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql b/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql new file mode 100644 index 0000000000..b97d81a5f0 --- /dev/null +++ b/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql @@ -0,0 +1,87 @@ +/* -- CSpace_v6.0-2 Pre-deploy for PAHMA + * + * CC-1478: migrates data from old to new tables: + * -- collectionobjects_anthropology_nagprainventorynamelist + * to collectionobjects_nagpra_nagprainventorynames + * -- collectionobjects_anthropology_nagpraapplicabilitylist + * to collectionobjects_nagpra_nagpracategories + * -- collectionobjects_pahma_pahmanagpracodelegacylist + * to collectionobjects_nagpra_graveassoccodes + * -- collectionobjects_anthropology_repatriationnotelist + * to collectionobjects_nagpra_repatriationnotes + * -- collectionobjects_anthropology_nagpraculturaldeterminationlist + * to collectionobjects_nagpra_nagpraculturaldeterminations + * + * Run as app_pahma: + * sudo su - app_pahma + * psql -h $DB_HOST -p $DB_PORT -d $PGDATABASE -U nuxeo$CSPACE_INSTANCE_ID -a -f cc1478_migrate.sql > cc1478_migrate.log 2>&1 + * +*/ + +DO $$ +DECLARE + c varchar[]; + carr varchar[] := array[['collectionobjects_anthropology_nagprainventorynamelist', + 'collectionobjects_nagpra_nagprainventorynames'] + , ['collectionobjects_anthropology_nagpraapplicabilitylist', + 'collectionobjects_nagpra_nagpracategories'] + , ['collectionobjects_pahma_pahmanagpracodelegacylist', + 'collectionobjects_nagpra_graveassoccodes'] + , ['collectionobjects_anthropology_repatriationnotelist', + 'collectionobjects_nagpra_repatriationnotes'] + , ['collectionobjects_anthropology_nagpraculturaldeterminationlist', + 'collectionobjects_nagpra_nagpraculturaldeterminations']]; + rc int; + tc0 int; + tc1 int; + tc int; + errmsg text; + +BEGIN + -- Check for correct database + IF (SELECT current_database() = 'pahma_domain_pahma') THEN + + -- Check tables exist + FOREACH c SLICE 1 IN ARRAY carr LOOP + IF ((SELECT true FROM pg_tables WHERE tablename = c[1]) AND (SELECT true FROM pg_tables WHERE tablename = c[2])) THEN + -- RAISE NOTICE 'INFO: TABLES EXIST: %', c[1]; + + -- check for existing and conflicting data on id and pos in new tables + EXECUTE 'select count(*) from ' || c[1] || ' t1 join ' || c[2] || ' t2 on (t1.id = t2.id and t1.pos = t2.pos)' + INTO rc; + + IF rc > 0 THEN + RAISE WARNING 'WARNING: % records in % contain duplicate id, pos.', rc, c[1]; + END IF; + + EXECUTE 'select count(*) from '|| c[2] + INTO tc0; + + -- copy records from original to destination tables + EXECUTE 'insert into '|| c[2] || ' (id, item, pos) ' || + ' select id, item, pos from ' || c[1]; + + EXECUTE 'select count(*) from '|| c[2] + INTO tc1; + + tc := tc1 - tc0; + + RAISE NOTICE 'INFO: INSERTED % % records into %', tc, c[1], c[2]; + + ELSE + RAISE WARNING 'ERROR: TABLE(S) MISSING: % or %', c[1], c[2]; + END IF; + + END LOOP; + + ELSE + RAISE WARNING 'ERROR: Not in pahma_domain_pahma database'; + END IF; + + EXCEPTION + WHEN OTHERS THEN + errmsg := SUBSTR(SQLERRM, 1, 100); + RAISE WARNING 'ERROR: %', errmsg; + +END $$; + diff --git a/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql b/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql new file mode 100644 index 0000000000..94a74ad5f8 --- /dev/null +++ b/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql @@ -0,0 +1,58 @@ +/* -- CSpace_v6.0-2 Pre-deploy for PAHMA + * + * CC-1509: Related to CC-1267 + * + * Exhibition data is not being displayed in UI due to changes in CC-1267 to remove Exhibition customizations. + * + * Update hierarchy.primarytype values for exhibition records to remove customization suffix. + * + * Update hierarchy.name values for exhibition repeating group records + * from exhibitions_pahma to exhibitions_common for: + * -- exhibitionStatusGroup + * -- exhibitionSectionGroup + * -- exhibitionObjectGroup + * -- galleryRotationGroup + * +*/ + +DO $$ +DECLARE + uc integer; + errmsg text; + +BEGIN + -- Check for correct database + IF (SELECT current_database() = 'pahma_domain_pahma') THEN + + -- update Exhibition records with correct hiearchy.primarytype + update hierarchy + set primarytype = 'Exhibition' + where primarytype = 'ExhibitionTenant15'; + + get diagnostics uc = row_count; + + RAISE NOTICE '% hierarchy.primarytype records updated for Exhibitions', uc; + + -- update Exhibition repeating group records with correct hiearchy.name + update hierarchy + set name = regexp_replace(name, '^exhibitions_pahma:', 'exhibitions_common:') + where primarytype in ( + 'exhibitionObjectGroup', + 'exhibitionSectionGroup', + 'exhibitionStatusGroup', + 'galleryRotationGroup'); + + get diagnostics uc = row_count; + + RAISE NOTICE '% hierarchy.name records updated for Exhibitions repeating groups', uc; + + ELSE + RAISE WARNING 'ERROR: Not in pahma_domain_pahma database'; + END IF; + + EXCEPTION + WHEN OTHERS THEN + errmsg := SUBSTR(SQLERRM, 1, 100); + RAISE WARNING 'ERROR: %', errmsg; + +END $$; From 8555835b7fd05347de4b61e2c32f9633fbd59fdc Mon Sep 17 00:00:00 2001 From: Lam Voong Date: Tue, 22 Dec 2020 13:59:28 -0800 Subject: [PATCH 08/12] Remove migration and hierarchy update scripts; to be run manually --- .../post-init/06_nagpra-collectionobject.sql | 87 ------------------- .../upgrade/6.0.0/post-init/07_exhibition.sql | 58 ------------- 2 files changed, 145 deletions(-) delete mode 100644 src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql delete mode 100644 src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql diff --git a/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql b/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql deleted file mode 100644 index b97d81a5f0..0000000000 --- a/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/06_nagpra-collectionobject.sql +++ /dev/null @@ -1,87 +0,0 @@ -/* -- CSpace_v6.0-2 Pre-deploy for PAHMA - * - * CC-1478: migrates data from old to new tables: - * -- collectionobjects_anthropology_nagprainventorynamelist - * to collectionobjects_nagpra_nagprainventorynames - * -- collectionobjects_anthropology_nagpraapplicabilitylist - * to collectionobjects_nagpra_nagpracategories - * -- collectionobjects_pahma_pahmanagpracodelegacylist - * to collectionobjects_nagpra_graveassoccodes - * -- collectionobjects_anthropology_repatriationnotelist - * to collectionobjects_nagpra_repatriationnotes - * -- collectionobjects_anthropology_nagpraculturaldeterminationlist - * to collectionobjects_nagpra_nagpraculturaldeterminations - * - * Run as app_pahma: - * sudo su - app_pahma - * psql -h $DB_HOST -p $DB_PORT -d $PGDATABASE -U nuxeo$CSPACE_INSTANCE_ID -a -f cc1478_migrate.sql > cc1478_migrate.log 2>&1 - * -*/ - -DO $$ -DECLARE - c varchar[]; - carr varchar[] := array[['collectionobjects_anthropology_nagprainventorynamelist', - 'collectionobjects_nagpra_nagprainventorynames'] - , ['collectionobjects_anthropology_nagpraapplicabilitylist', - 'collectionobjects_nagpra_nagpracategories'] - , ['collectionobjects_pahma_pahmanagpracodelegacylist', - 'collectionobjects_nagpra_graveassoccodes'] - , ['collectionobjects_anthropology_repatriationnotelist', - 'collectionobjects_nagpra_repatriationnotes'] - , ['collectionobjects_anthropology_nagpraculturaldeterminationlist', - 'collectionobjects_nagpra_nagpraculturaldeterminations']]; - rc int; - tc0 int; - tc1 int; - tc int; - errmsg text; - -BEGIN - -- Check for correct database - IF (SELECT current_database() = 'pahma_domain_pahma') THEN - - -- Check tables exist - FOREACH c SLICE 1 IN ARRAY carr LOOP - IF ((SELECT true FROM pg_tables WHERE tablename = c[1]) AND (SELECT true FROM pg_tables WHERE tablename = c[2])) THEN - -- RAISE NOTICE 'INFO: TABLES EXIST: %', c[1]; - - -- check for existing and conflicting data on id and pos in new tables - EXECUTE 'select count(*) from ' || c[1] || ' t1 join ' || c[2] || ' t2 on (t1.id = t2.id and t1.pos = t2.pos)' - INTO rc; - - IF rc > 0 THEN - RAISE WARNING 'WARNING: % records in % contain duplicate id, pos.', rc, c[1]; - END IF; - - EXECUTE 'select count(*) from '|| c[2] - INTO tc0; - - -- copy records from original to destination tables - EXECUTE 'insert into '|| c[2] || ' (id, item, pos) ' || - ' select id, item, pos from ' || c[1]; - - EXECUTE 'select count(*) from '|| c[2] - INTO tc1; - - tc := tc1 - tc0; - - RAISE NOTICE 'INFO: INSERTED % % records into %', tc, c[1], c[2]; - - ELSE - RAISE WARNING 'ERROR: TABLE(S) MISSING: % or %', c[1], c[2]; - END IF; - - END LOOP; - - ELSE - RAISE WARNING 'ERROR: Not in pahma_domain_pahma database'; - END IF; - - EXCEPTION - WHEN OTHERS THEN - errmsg := SUBSTR(SQLERRM, 1, 100); - RAISE WARNING 'ERROR: %', errmsg; - -END $$; - diff --git a/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql b/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql deleted file mode 100644 index 94a74ad5f8..0000000000 --- a/src/main/resources/db/postgresql/upgrade/6.0.0/post-init/07_exhibition.sql +++ /dev/null @@ -1,58 +0,0 @@ -/* -- CSpace_v6.0-2 Pre-deploy for PAHMA - * - * CC-1509: Related to CC-1267 - * - * Exhibition data is not being displayed in UI due to changes in CC-1267 to remove Exhibition customizations. - * - * Update hierarchy.primarytype values for exhibition records to remove customization suffix. - * - * Update hierarchy.name values for exhibition repeating group records - * from exhibitions_pahma to exhibitions_common for: - * -- exhibitionStatusGroup - * -- exhibitionSectionGroup - * -- exhibitionObjectGroup - * -- galleryRotationGroup - * -*/ - -DO $$ -DECLARE - uc integer; - errmsg text; - -BEGIN - -- Check for correct database - IF (SELECT current_database() = 'pahma_domain_pahma') THEN - - -- update Exhibition records with correct hiearchy.primarytype - update hierarchy - set primarytype = 'Exhibition' - where primarytype = 'ExhibitionTenant15'; - - get diagnostics uc = row_count; - - RAISE NOTICE '% hierarchy.primarytype records updated for Exhibitions', uc; - - -- update Exhibition repeating group records with correct hiearchy.name - update hierarchy - set name = regexp_replace(name, '^exhibitions_pahma:', 'exhibitions_common:') - where primarytype in ( - 'exhibitionObjectGroup', - 'exhibitionSectionGroup', - 'exhibitionStatusGroup', - 'galleryRotationGroup'); - - get diagnostics uc = row_count; - - RAISE NOTICE '% hierarchy.name records updated for Exhibitions repeating groups', uc; - - ELSE - RAISE WARNING 'ERROR: Not in pahma_domain_pahma database'; - END IF; - - EXCEPTION - WHEN OTHERS THEN - errmsg := SUBSTR(SQLERRM, 1, 100); - RAISE WARNING 'ERROR: %', errmsg; - -END $$; From 55d103778734d42fc0ef10f7aed2a6e2b6194a6a Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 22 Dec 2020 14:32:17 -0800 Subject: [PATCH 09/12] CC-1480: Bumping version of pahma ui plugin to use. --- cspace-ui/pahma/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspace-ui/pahma/build.properties b/cspace-ui/pahma/build.properties index 05268f81e7..fb0c898235 100644 --- a/cspace-ui/pahma/build.properties +++ b/cspace-ui/pahma/build.properties @@ -3,4 +3,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-pahma tenant.ui.profile.plugin.library.name=cspaceUIPluginProfilePAHMA -tenant.ui.profile.plugin.version=3.0.0-d.5 +tenant.ui.profile.plugin.version=3.0.0-d.7 From 4cc72dff762fef1633e5e9dde180e00fb6d5b724 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 22 Dec 2020 16:41:04 -0800 Subject: [PATCH 10/12] CC-1480: Updating to latest version of pahma ui plugin. --- cspace-ui/pahma/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cspace-ui/pahma/build.properties b/cspace-ui/pahma/build.properties index fb0c898235..ef928c12fb 100644 --- a/cspace-ui/pahma/build.properties +++ b/cspace-ui/pahma/build.properties @@ -3,4 +3,4 @@ tenant.ui.basename=/cspace/${tenant.shortname} tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-pahma tenant.ui.profile.plugin.library.name=cspaceUIPluginProfilePAHMA -tenant.ui.profile.plugin.version=3.0.0-d.7 +tenant.ui.profile.plugin.version=3.0.0-d.8 From 31e75ca91fdc7b142b69e1c768a2352da8bd93e8 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 22 Dec 2020 16:58:26 -0800 Subject: [PATCH 11/12] NOJIRA: Updating payload for ucbgLabelOrder report to accept single records. --- .../main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml b/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml index d868d2343d..34231cd02e 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml @@ -6,7 +6,8 @@ CollectionObject - false + + true false false true From 403ada333c38e8a9a5e729d0e972e8a84be5ac01 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 22 Dec 2020 17:01:16 -0800 Subject: [PATCH 12/12] NOJIRA: Updating payload for ucbgLabelOrder report to accept single records. --- .../src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml b/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml index 34231cd02e..d8b736b398 100644 --- a/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml +++ b/services/report/3rdparty/jasper-cs-report/src/main/resources/tenants/ucbg/payloads/ucbgLabelOrder.xml @@ -2,7 +2,7 @@ Label Orders - ucbgLabelOrder.jrxml + ucbgLabelOrder.jasper CollectionObject