From 1abfc9944a4f19580ef111ffd2b1d829e4067c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20H=C3=A4nsel?= Date: Wed, 10 Jul 2024 18:38:39 +0200 Subject: [PATCH] update Resource seeds requirement --- db/seeds/018_MDS_3_3_Project_gen.seeds.rb | 14 +++++++------- db/seeds/019_MDS_3_3_Study_gen.seeds.rb | 14 +++++++------- db/seeds/020_MDS_3_3_Investigation_gen.seeds.rb | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/db/seeds/018_MDS_3_3_Project_gen.seeds.rb b/db/seeds/018_MDS_3_3_Project_gen.seeds.rb index e3a2bfdc1d..d8252163e3 100644 --- a/db/seeds/018_MDS_3_3_Project_gen.seeds.rb +++ b/db/seeds/018_MDS_3_3_Project_gen.seeds.rb @@ -471,7 +471,7 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_classification_Project', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_classification_Project', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_classification_type_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_classification_type_Project_cv, description:'A term describing the resource.', label:'Type of the resource(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_classification_type_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_classification_type_Project_cv, description:'A term describing the resource.', label:'Type of the resource',required: true) emt.save! end @@ -482,8 +482,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_titles_Project', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_titles_Project', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_text_Project', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'Scientific unabbreviated title or name of the Project. ', label: 'Title/name(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_language_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_titles_language_Project_cv, description:'Language in which the title/name is provided.', label:'Language of the title/name(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_text_Project', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'Scientific unabbreviated title or name of the Project. ', label: 'Title/name',required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_language_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_titles_language_Project_cv, description:'Language in which the title/name is provided.', label:'Language of the title/name',required: true) emt.save! end @@ -494,8 +494,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_acronyms_Project', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_acronyms_Project', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_text_Project', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'If existing, acronym(s) of the Project.', label: 'Acronym(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_language_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_acronyms_language_Project_cv, description:'Language in which the acronym is provided.', label:'Language of the acronym(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_text_Project', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'If existing, acronym(s) of the Project.', label: 'Acronym',required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_language_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_acronyms_language_Project_cv, description:'Language in which the acronym is provided.', label:'Language of the acronym',required: true) emt.save! end @@ -506,8 +506,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_descriptions_Project', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_descriptions_Project', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_text_Project', sample_attribute_type: @text_type, sample_controlled_vocab: nil, description: 'Short plain text summary of the Project.', label: 'Description(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_language_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_descriptions_language_Project_cv, description:'Language in which the description text is provided.', label:'Language of the description(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_text_Project', sample_attribute_type: @text_type, sample_controlled_vocab: nil, description: 'Short plain text summary of the Project.', label: 'Description',required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_language_Project', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_descriptions_language_Project_cv, description:'Language in which the description text is provided.', label:'Language of the description',required: true) emt.save! end diff --git a/db/seeds/019_MDS_3_3_Study_gen.seeds.rb b/db/seeds/019_MDS_3_3_Study_gen.seeds.rb index a4c930bb25..a1f3699d13 100644 --- a/db/seeds/019_MDS_3_3_Study_gen.seeds.rb +++ b/db/seeds/019_MDS_3_3_Study_gen.seeds.rb @@ -471,7 +471,7 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_classification_Study', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_classification_Study', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_classification_type_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_classification_type_Study_cv, description:'A term describing the resource.', label:'Type of the resource(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_classification_type_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_classification_type_Study_cv, description:'A term describing the resource.', label:'Type of the resource', required: true) emt.save! end @@ -482,8 +482,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_titles_Study', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_titles_Study', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_text_Study', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'Scientific unabbreviated title or name of the Study. ', label: 'Title/name(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_language_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_titles_language_Study_cv, description:'Language in which the title/name is provided.', label:'Language of the title/name(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_text_Study', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'Scientific unabbreviated title or name of the Study. ', label: 'Title/name',required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_language_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_titles_language_Study_cv, description:'Language in which the title/name is provided.', label:'Language of the title/name',required: true) emt.save! end @@ -494,8 +494,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_acronyms_Study', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_acronyms_Study', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_text_Study', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'If existing, acronym(s) of the Study.', label: 'Acronym(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_language_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_acronyms_language_Study_cv, description:'Language in which the acronym is provided.', label:'Language of the acronym(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_text_Study', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'If existing, acronym(s) of the Study.', label: 'Acronym',required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_language_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_acronyms_language_Study_cv, description:'Language in which the acronym is provided.', label:'Language of the acronym',required: true) emt.save! end @@ -506,8 +506,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_descriptions_Study', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_descriptions_Study', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_text_Study', sample_attribute_type: @text_type, sample_controlled_vocab: nil, description: 'Short plain text summary of the Study.', label: 'Description(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_language_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_descriptions_language_Study_cv, description:'Language in which the description text is provided.', label:'Language of the description(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_text_Study', sample_attribute_type: @text_type, sample_controlled_vocab: nil, description: 'Short plain text summary of the Study.', label: 'Description', required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_language_Study', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_descriptions_language_Study_cv, description:'Language in which the description text is provided.', label:'Language of the description', required: true) emt.save! end diff --git a/db/seeds/020_MDS_3_3_Investigation_gen.seeds.rb b/db/seeds/020_MDS_3_3_Investigation_gen.seeds.rb index b1b409257c..50e98a35ad 100644 --- a/db/seeds/020_MDS_3_3_Investigation_gen.seeds.rb +++ b/db/seeds/020_MDS_3_3_Investigation_gen.seeds.rb @@ -471,7 +471,7 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_classification_Investigation', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_classification_Investigation', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_classification_type_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_classification_type_Investigation_cv, description:'A term describing the resource.', label:'Type of the resource(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_classification_type_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_classification_type_Investigation_cv, description:'A term describing the resource.', label:'Type of the resource', required: true) emt.save! end @@ -482,8 +482,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_titles_Investigation', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_titles_Investigation', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_text_Investigation', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'Scientific unabbreviated title or name of the Investigation. ', label: 'Title/name(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_language_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_titles_language_Investigation_cv, description:'Language in which the title/name is provided.', label:'Language of the title/name(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_text_Investigation', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'Scientific unabbreviated title or name of the Investigation. ', label: 'Title/name', required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_titles_language_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_titles_language_Investigation_cv, description:'Language in which the title/name is provided.', label:'Language of the title/name', required: true) emt.save! end @@ -494,8 +494,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_acronyms_Investigation', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_acronyms_Investigation', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_text_Investigation', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'If existing, acronym(s) of the Investigation.', label: 'Acronym(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_language_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_acronyms_language_Investigation_cv, description:'Language in which the acronym is provided.', label:'Language of the acronym(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_text_Investigation', sample_attribute_type: @string_type, sample_controlled_vocab: nil, description: 'If existing, acronym(s) of the Investigation.', label: 'Acronym', required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_acronyms_language_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_acronyms_language_Investigation_cv, description:'Language in which the acronym is provided.', label:'Language of the acronym', required: true) emt.save! end @@ -506,8 +506,8 @@ def create_sample_controlled_vocab_terms_attributes(array) unless ExtendedMetadataType.where(title:'Resource_descriptions_Investigation', supported_type:'ExtendedMetadata').any? emt = ExtendedMetadataType.new(title: 'Resource_descriptions_Investigation', supported_type:'ExtendedMetadata') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_text_Investigation', sample_attribute_type: @text_type, sample_controlled_vocab: nil, description: 'Short plain text summary of the Investigation.', label: 'Description(*)') - emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_language_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_descriptions_language_Investigation_cv, description:'Language in which the description text is provided.', label:'Language of the description(*)') + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_text_Investigation', sample_attribute_type: @text_type, sample_controlled_vocab: nil, description: 'Short plain text summary of the Investigation.', label: 'Description', required: true) + emt.extended_metadata_attributes << ExtendedMetadataAttribute.new(title: 'Resource_descriptions_language_Investigation', sample_attribute_type: @cv_type, sample_controlled_vocab:Resource_descriptions_language_Investigation_cv, description:'Language in which the description text is provided.', label:'Language of the description', required: true) emt.save! end