From 3f758f6c634cb8176dcbcd7fe8bd74ae261d5039 Mon Sep 17 00:00:00 2001 From: jmaeng72 <44305062+jmaeng72@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:43:40 -0400 Subject: [PATCH] update to migrate collectionprogress down to planned instead of complete --- .../collection/umm/v1.18.2/umm-c-json-schema.json | 4 ++-- .../src/cmr/umm_spec/migration/version/collection.clj | 4 ++-- .../test/cmr/umm_spec/test/migration/version/collection.clj | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/umm-spec-lib/resources/json-schemas/collection/umm/v1.18.2/umm-c-json-schema.json b/umm-spec-lib/resources/json-schemas/collection/umm/v1.18.2/umm-c-json-schema.json index 4747d974c0..9b27b9c00c 100644 --- a/umm-spec-lib/resources/json-schemas/collection/umm/v1.18.2/umm-c-json-schema.json +++ b/umm-spec-lib/resources/json-schemas/collection/umm/v1.18.2/umm-c-json-schema.json @@ -1905,7 +1905,7 @@ "URL": { "description": "This element represents the URL where the schema lives. The schema can be downloaded.", "type": "string", - "enum": ["https://cdn.earthdata.nasa.gov/umm/collection/v1.18.1"] + "enum": ["https://cdn.earthdata.nasa.gov/umm/collection/v1.18.2"] }, "Name": { "description": "This element represents the name of the schema.", @@ -1915,7 +1915,7 @@ "Version": { "description": "This element represents the version of the schema.", "type": "string", - "enum": ["1.18.1"] + "enum": ["1.18.2"] } }, "required": ["URL", "Name", "Version"] diff --git a/umm-spec-lib/src/cmr/umm_spec/migration/version/collection.clj b/umm-spec-lib/src/cmr/umm_spec/migration/version/collection.clj index 9638ceffbc..9ae26c4bac 100644 --- a/umm-spec-lib/src/cmr/umm_spec/migration/version/collection.clj +++ b/umm-spec-lib/src/cmr/umm_spec/migration/version/collection.clj @@ -773,7 +773,7 @@ (if (or (= "PREPRINT" collectionProgress) (= "INREVIEW" collectionProgress) (= "SUPERSEDED" collectionProgress)) - "COMPLETE" + "PLANNED" collectionProgress))) (defmethod interface/migrate-umm-version [:collection "1.18.2" "1.18.1"] @@ -791,7 +791,7 @@ (-> coll (util/update-in-each [:AssociatedDOIs] migrate-associated-doi-type-down)) coll)) - ;; Change CollectionProgress enum to COMPLETED if its enum value is PREPRINT, INREVIEW, or SUPERSEDED + ;; Change CollectionProgress enum to PLANNED if its enum value is PREPRINT, INREVIEW, or SUPERSEDED (as-> coll (if (contains? coll :CollectionProgress) (-> coll (update :CollectionProgress migrate-collection-progress-down)) diff --git a/umm-spec-lib/test/cmr/umm_spec/test/migration/version/collection.clj b/umm-spec-lib/test/cmr/umm_spec/test/migration/version/collection.clj index 43bc8688e8..0fdd4c5a49 100644 --- a/umm-spec-lib/test/cmr/umm_spec/test/migration/version/collection.clj +++ b/umm-spec-lib/test/cmr/umm_spec/test/migration/version/collection.clj @@ -3887,7 +3887,7 @@ "Migrating CollectionProgress enum PREPRINT back to COMPLETED" ;; expected - {:CollectionProgress "COMPLETED" + {:CollectionProgress "PLANNED" :MetadataSpecification {:URL "https://cdn.earthdata.nasa.gov/umm/collection/v1.18.1", :Name "UMM-C", :Version "1.18.1"}} @@ -3899,7 +3899,7 @@ "Migrating CollectionProgress enum PREPRINT back to COMPLETED" ;; expected - {:CollectionProgress "COMPLETED" + {:CollectionProgress "PLANNED" :MetadataSpecification {:URL "https://cdn.earthdata.nasa.gov/umm/collection/v1.18.1", :Name "UMM-C", :Version "1.18.1"}} @@ -3911,7 +3911,7 @@ "Migrating CollectionProgress enum SUPERSEDED back to COMPLETED" ;; expected - {:CollectionProgress "COMPLETED" + {:CollectionProgress "PLANNED" :MetadataSpecification {:URL "https://cdn.earthdata.nasa.gov/umm/collection/v1.18.1", :Name "UMM-C", :Version "1.18.1"}}