diff --git a/app/models/study.rb b/app/models/study.rb index ebfd589446..bc00c799da 100644 --- a/app/models/study.rb +++ b/app/models/study.rb @@ -82,11 +82,27 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength DATA_RELEASE_TIMING_IMMEDIATE, DATA_RELEASE_TIMING_DELAYED ].freeze - DATA_RELEASE_PREVENTION_REASONS = ['data validity', 'legal', 'replication of data subset'].freeze - DATA_RELEASE_DELAY_FOR_OTHER = 'other' - DATA_RELEASE_DELAY_REASONS_STANDARD = ['phd study', DATA_RELEASE_DELAY_FOR_OTHER].freeze - DATA_RELEASE_DELAY_REASONS_ASSAY = ['phd study', 'assay of no other use', DATA_RELEASE_DELAY_FOR_OTHER].freeze + OLD_DATA_RELEASE_PREVENTION_REASONS = ['data validity', 'legal', 'replication of data subset'].freeze + DATA_RELEASE_PREVENTION_REASONS = [ + 'Pilot or validation studies - DAC approval not required', + 'Collaborators will share data in a research repository - DAC approval not required', + 'Prevent harm (e.g sensitive studies or biosecurity) - DAC approval required', + 'Protecting IP - DAC approval required', + 'Other (please specify)' + ].freeze + + OLD_DATA_RELEASE_DELAY_FOR_OTHER = 'other' + DATA_RELEASE_DELAY_FOR_OTHER = 'Other (with free text box)' + OLD_DATA_RELEASE_DELAY_REASONS = ['other', 'phd study'].freeze + DATA_RELEASE_DELAY_REASONS_STANDARD = [ + 'PhD study', + 'Capacity building', + 'Intellectual property protection', + 'Additional time to make data FAIR', + DATA_RELEASE_DELAY_FOR_OTHER + ].freeze + DATA_RELEASE_DELAY_REASONS_ASSAY = ['assay of no other use'].freeze DATA_RELEASE_DELAY_PERIODS = ['3 months', '6 months', '9 months', '12 months', '18 months'].freeze @@ -214,9 +230,10 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength custom_attribute( :data_release_delay_reason, required: true, - in: DATA_RELEASE_DELAY_REASONS_ASSAY, + in: [*DATA_RELEASE_DELAY_REASONS_STANDARD, *DATA_RELEASE_DELAY_REASONS_ASSAY, *OLD_DATA_RELEASE_DELAY_REASONS], if: :delayed_release? ) + custom_attribute(:data_release_delay_period, required: true, in: DATA_RELEASE_DELAY_PERIODS, if: :delayed_release?) custom_attribute(:bam, default: true) @@ -231,14 +248,14 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength custom_attribute(:ega_policy_accession_number) custom_attribute(:array_express_accession_number) - with_options(if: :delayed_for_long_time?, required: true) do - custom_attribute(:data_release_delay_approval, in: YES_OR_NO, default: NO) - end - - with_options(if: :never_release?, required: true) do - custom_attribute(:data_release_prevention_reason, in: DATA_RELEASE_PREVENTION_REASONS) - custom_attribute(:data_release_prevention_approval, in: YES_OR_NO) - custom_attribute(:data_release_prevention_reason_comment) + with_options(if: :never_release?) do + custom_attribute( + :data_release_prevention_reason, + in: [*DATA_RELEASE_PREVENTION_REASONS, *OLD_DATA_RELEASE_PREVENTION_REASONS], + required: true + ) + custom_attribute(:data_release_prevention_reason_comment, required: true) + custom_attribute(:data_release_prevention_approval) end # NOTE: Additional validation in Study::Metadata Class to validate_presence_of :data_access_group, if: :managed @@ -567,6 +584,33 @@ def poly_metadatum_by_key(key) poly_metadata.find { |pm| pm.key == key.to_s } end + # Helper method for edit dropdowns to support backwards compatibility with old options. + # + # @return [Array] the list of options for the data release prevention reason dropdown + def data_release_prevention_options + additional_options = [] + if OLD_DATA_RELEASE_PREVENTION_REASONS.include? study_metadata.data_release_prevention_reason + additional_options << study_metadata.data_release_prevention_reason + end + + DATA_RELEASE_PREVENTION_REASONS + additional_options + end + + # Helper method for edit dropdowns to support backwards compatibility with old options. + # + # @param [Boolean] assay_option - whether to include assay-specific options + # @return [Array] the list of options for the data release delay reason dropdown + def data_release_delay_options(assay_option: false) + # If the current value is an old one, then we need to include it in the list of options + additional_options = [] + if OLD_DATA_RELEASE_DELAY_REASONS.include? study_metadata.data_release_delay_reason + additional_options << study_metadata.data_release_delay_reason + end + + additional_options.concat(DATA_RELEASE_DELAY_REASONS_ASSAY) if assay_option + DATA_RELEASE_DELAY_REASONS_STANDARD + additional_options + end + private def valid_ethically_approved? @@ -601,7 +645,7 @@ def never_release? end def delayed_for_other_reasons? - data_release_delay_reason == DATA_RELEASE_DELAY_FOR_OTHER + [DATA_RELEASE_DELAY_FOR_OTHER, OLD_DATA_RELEASE_DELAY_FOR_OTHER].include?(data_release_delay_reason) end def delayed_for_long_time? diff --git a/app/views/shared/metadata/_related_fields.html.erb b/app/views/shared/metadata/_related_fields.html.erb index d748e8d430..9d59fb9bdc 100644 --- a/app/views/shared/metadata/_related_fields.html.erb +++ b/app/views/shared/metadata/_related_fields.html.erb @@ -23,7 +23,7 @@ var valueFrom = function(element) { if (element === null) { return null } - var value = element.value.toLowerCase().replace(/[^a-z0-9]+/, '_'); + var value = element.value.toLowerCase().replaceAll(/[^a-z0-9]+/g, '_'); return (value.length == 0) ? 'blank' : value; }; diff --git a/app/views/shared/metadata/edit/_study.html.erb b/app/views/shared/metadata/edit/_study.html.erb index 4f16c90e52..b174425fd9 100644 --- a/app/views/shared/metadata/edit/_study.html.erb +++ b/app/views/shared/metadata/edit/_study.html.erb @@ -59,25 +59,22 @@ %> <% metadata_fields.related_fields(to: :data_release_strategy, when: Study::DATA_RELEASE_STRATEGY_NOT_APPLICABLE) do %> - <%= group.select(:data_release_prevention_reason, Study::DATA_RELEASE_PREVENTION_REASONS) %> - <%= group.radio_select(:data_release_prevention_approval, Study::YES_OR_NO) %> + <%= group.select(:data_release_prevention_reason, study.data_release_prevention_options) %> + <%= group.text_area(:data_release_prevention_approval) %> <%= group.text_area(:data_release_prevention_reason_comment) %> <% end %> <% metadata_fields.related_fields(to: :data_release_strategy, in: Study::DATA_RELEASE_STRATEGIES, not: Study::DATA_RELEASE_STRATEGY_NOT_APPLICABLE) do %> <% metadata_fields.related_fields(to: :data_release_timing, when: Study::DATA_RELEASE_TIMING_DELAYED) do %> - <%= group.select(:data_release_delay_reason, Study::DATA_RELEASE_DELAY_REASONS_STANDARD) %> + <%= group.select(:data_release_delay_reason, study.data_release_delay_options) %> <% group.change_select_options_for(:data_release_delay_reason, when: :data_release_study_type_id, values: { - DataReleaseStudyType.assay_types.map(&:id) => [ '' ] + Study::DATA_RELEASE_DELAY_REASONS_ASSAY, - DataReleaseStudyType.non_assay_types.map(&:id) => [ '' ] + Study::DATA_RELEASE_DELAY_REASONS_STANDARD + DataReleaseStudyType.assay_types.map(&:id) => [ '' ] + study.data_release_delay_options(assay_option: true), + DataReleaseStudyType.non_assay_types.map(&:id) => [ '' ] + study.data_release_delay_options }) %> <%= group.select(:data_release_delay_period, Study::DATA_RELEASE_DELAY_PERIODS) %> - <% metadata_fields.related_fields(to: :data_release_delay_period, in: Study::DATA_RELEASE_DELAY_PERIODS) do %> - <%= group.radio_select(:data_release_delay_approval, Study::YES_OR_NO) %> - <% end %> - <% metadata_fields.related_fields(to: :data_release_delay_reason, when: Study::DATA_RELEASE_DELAY_FOR_OTHER) do %> + <% metadata_fields.related_fields(to: :data_release_delay_reason, in: [Study::DATA_RELEASE_DELAY_FOR_OTHER, Study::OLD_DATA_RELEASE_DELAY_FOR_OTHER]) do %> <%= group.text_area(:data_release_delay_other_comment) %> <% metadata_fields.related_fields(to: :data_release_delay_period, in: Study::DATA_RELEASE_DELAY_PERIODS) do %> <%= group.text_area(:data_release_delay_reason_comment) %> diff --git a/config/locales/metadata/en.yml b/config/locales/metadata/en.yml index db6ed0d4de..6e0890bb9d 100644 --- a/config/locales/metadata/en.yml +++ b/config/locales/metadata/en.yml @@ -424,7 +424,7 @@ en: values: open: "Open (ENA)" managed: "Managed (EGA)" - not_applicable: "Not Applicable (Contact Datasharing)" + not_applicable: "Not Applicable" data_release_standard_agreement: label: "Will you be using WTSI's standard access agreement?" @@ -434,13 +434,13 @@ en: data_release_timing: label: How is the data release to be timed? - help: "Choose from:

Immediate: To be released as soon as possible.

Standard: To be released:

Delayed:

Never: This option is only available if the data release strategy is set to 'Not applicable.'

" + help: "Choose from:

Immediate: To be released as soon as possible.

Standard: To be released:

Delayed:

Never: This option is only available if the data release strategy is set to 'Not applicable.'

" data_release_prevention_reason: label: What is the reason for preventing data release? data_release_prevention_approval: - label: Has this been approved? + label: If reason for exemption requires DAC approval, what is the approval number? help: "If this is for data validity reasons: approval from the sponsor is required
If this is for legal reasons: approval from the Data Sharing Committee is required (please contact sd4)
" data_release_prevention_reason_comment: @@ -448,7 +448,6 @@ en: data_release_delay_reason: label: Reason for delaying release - help: 'To apply for a delay, please contact <%= configatron.data_sharing_contact.email %>' data_release_delay_other_comment: label: Please explain the reason for delaying release diff --git a/features/studies/4295391_study_xml_needs_to_be_reverted_to_old_version.feature b/features/studies/4295391_study_xml_needs_to_be_reverted_to_old_version.feature index 331c614d46..8057e24450 100644 --- a/features/studies/4295391_study_xml_needs_to_be_reverted_to_old_version.feature +++ b/features/studies/4295391_study_xml_needs_to_be_reverted_to_old_version.feature @@ -115,7 +115,7 @@ Feature: The XML for the sequencescape API Not specified - Has this been approved? + If reason for exemption requires DAC approval, what is the approval number? @@ -150,10 +150,6 @@ Feature: The XML for the sequencescape API Are all the samples to be used in this study commercially available, unlinked anonymised cell-lines? No - - Has the delay period been approved by the data sharing committee for this project? - - ENA Project ID diff --git a/features/studies/8447221_data_release_help_text.feature b/features/studies/8447221_data_release_help_text.feature index a245f126d6..dd79263d3e 100644 --- a/features/studies/8447221_data_release_help_text.feature +++ b/features/studies/8447221_data_release_help_text.feature @@ -22,11 +22,8 @@ Feature: Update the data release fields for creating a study Scenario Outline: Add help text opposite delay drop down (4044305) When I choose "" from "What is the data release strategy for this study?" When I select "delayed" from "How is the data release to be timed?" - When I select "other" from "Reason for delaying release" - Then the help text for "Reason for delaying release" should contain: - """ - To apply for a delay, please contact datasharing@example.com - """ + When I select "Other (with free text box)" from "Reason for delaying release" + Then I should exactly see "Reason for delaying release" Examples: | release strategy | @@ -34,9 +31,9 @@ Feature: Update the data release fields for creating a study | Open (ENA) | Scenario: Add help text to has this been approved for never release (4044343) - When I choose "Not Applicable (Contact Datasharing)" from "What is the data release strategy for this study?" + When I choose "Not Applicable" from "What is the data release strategy for this study?" When I select "never" from "How is the data release to be timed?" - Then the help text for "Has this been approved?" should contain: + Then the help text for "If reason for exemption requires DAC approval, what is the approval number?" should contain: """ If this is for data validity reasons: approval from the sponsor is required If this is for legal reasons: approval from the Data Sharing Committee is required (please contact sd4) @@ -44,9 +41,8 @@ Feature: Update the data release fields for creating a study Scenario Outline: Delaying for 3 months should have the same questions as all other delays (4044273) When I select "delayed" from "How is the data release to be timed?" - And I select "other" from "Reason for delaying release" + And I select "Other (with free text box)" from "Reason for delaying release" And I select "" from "Delay for" - Then I should exactly see "Has the delay period been approved by the data sharing committee for this project?" And I should exactly see "Comment regarding data release timing and approval" When I fill in the following: diff --git a/features/studies/data_release_timings.feature b/features/studies/data_release_timings.feature index c8e210b365..cc6562c638 100644 --- a/features/studies/data_release_timings.feature +++ b/features/studies/data_release_timings.feature @@ -28,7 +28,7 @@ Feature: Studies have timings for release of their data Scenario: When the data release is delayed for PhD study Given I select "delayed" from "How is the data release to be timed?" - And I select "phd study" from "Reason for delaying release" + And I select "PhD study" from "Reason for delaying release" Then the "Comment regarding data release timing and approval" field is hidden When I select "6 months" from "Delay for" And I press "Create" @@ -37,7 +37,7 @@ Feature: Studies have timings for release of their data Scenario Outline: When the data release is delayed but no reasons are provided Given I select "delayed" from "How is the data release to be timed?" - And I select "other" from "Reason for delaying release" + And I select "Other (with free text box)" from "Reason for delaying release" And I fill in "Please explain the reason for delaying release" with "Some reason" And I select "" from "Delay for" When I press "Create" @@ -54,7 +54,7 @@ Feature: Studies have timings for release of their data Scenario Outline: When the data release is delayed and the reasons are provided Given I select "delayed" from "How is the data release to be timed?" - And I select "other" from "Reason for delaying release" + And I select "Other (with free text box)" from "Reason for delaying release" And I fill in "Please explain the reason for delaying release" with "Some reason" And I select "" from "Delay for" And I fill in "Comment regarding data release timing and approval" with "Because it is ok?" @@ -70,19 +70,21 @@ Feature: Studies have timings for release of their data | 12 months | Scenario: When the data release is never but the comment is not supplied - When I choose "Not Applicable (Contact Datasharing)" from "What is the data release strategy for this study?" + When I choose "Not Applicable" from "What is the data release strategy for this study?" And I select "never" from "How is the data release to be timed?" - And I choose "Yes" from "Has this been approved?" + And I select "Protecting IP - DAC approval required" from "What is the reason for preventing data release?" + And I fill in "If reason for exemption requires DAC approval, what is the approval number?" with "12345" When I press "Create" Then I should be on the studies page # Again, ideally without study metadata And I should see "Study metadata data release prevention reason comment can't be blank" Scenario: When the data release is never and the comment is supplied - When I choose "Not Applicable (Contact Datasharing)" from "What is the data release strategy for this study?" + When I choose "Not Applicable" from "What is the data release strategy for this study?" And I select "never" from "How is the data release to be timed?" + And I select "Protecting IP - DAC approval required" from "What is the reason for preventing data release?" And I fill in "Comment regarding prevention of data release and approval" with "Some reason" - And I choose "Yes" from "Has this been approved?" + And I fill in "If reason for exemption requires DAC approval, what is the approval number?" with "12345" When I press "Create" Then I should be on the study information page for "Testing data release strategies" And I should see "Your study has been created" diff --git a/features/support/step_definitions/study_steps.rb b/features/support/step_definitions/study_steps.rb index e3bacbb72b..86f220fab3 100644 --- a/features/support/step_definitions/study_steps.rb +++ b/features/support/step_definitions/study_steps.rb @@ -159,10 +159,9 @@ def given_study_metadata(attribute, regexp) study.update!( study_metadata_attributes: { data_release_timing: 'delayed', - data_release_delay_reason: 'other', + data_release_delay_reason: 'Other (with free text box)', data_release_delay_other_comment: reason, data_release_delay_period: "#{period} months", - data_release_delay_approval: 'Yes', data_release_delay_reason_comment: reason } ) diff --git a/spec/factories/study_factories.rb b/spec/factories/study_factories.rb index 8ab0fcae97..9603449b12 100644 --- a/spec/factories/study_factories.rb +++ b/spec/factories/study_factories.rb @@ -54,7 +54,7 @@ new_field_values = { data_release_strategy: 'not applicable', data_release_timing: 'never', - data_release_prevention_reason: 'data validity', + data_release_prevention_reason: 'Protecting IP - DAC approval required', data_release_prevention_approval: 'Yes', data_release_prevention_reason_comment: 'This is the reason context' } diff --git a/spec/features/studies/create_study_spec.rb b/spec/features/studies/create_study_spec.rb index 4f63079c5b..e4545f5182 100644 --- a/spec/features/studies/create_study_spec.rb +++ b/spec/features/studies/create_study_spec.rb @@ -40,7 +40,7 @@ within_fieldset('What is the data release strategy for this study?') do expect(page).to have_field('Open (ENA)', type: :radio) expect(page).to have_field('Managed (EGA)', type: :radio) - expect(page).to have_field('Not Applicable (Contact Datasharing)', type: :radio) + expect(page).to have_field('Not Applicable', type: :radio) end within_fieldset('Study Visibility') do @@ -132,8 +132,8 @@ expect(page).to have_field('HuMFre approval number', type: :text) end - it 'displays HuMFre approval number when Not Applicable (Contact Datasharing) is clicked' do - choose('Not Applicable (Contact Datasharing)', allow_label_click: true) + it 'displays HuMFre approval number when Not Applicable is clicked' do + choose('Not Applicable', allow_label_click: true) expect(page).to have_field('HuMFre approval number', type: :text) end end diff --git a/spec/features/studies/edit_study_spec.rb b/spec/features/studies/edit_study_spec.rb index c8a29b8138..a21ac64c62 100644 --- a/spec/features/studies/edit_study_spec.rb +++ b/spec/features/studies/edit_study_spec.rb @@ -69,8 +69,8 @@ expect(page).to have_field('HuMFre approval number', type: :text) end - it 'displays HuMFre approval number when Not Applicable (Contact Datasharing) is clicked' do - choose('Not Applicable (Contact Datasharing)', allow_label_click: true) + it 'displays HuMFre approval number when Not Applicable is clicked' do + choose('Not Applicable', allow_label_click: true) expect(page).to have_field('HuMFre approval number', type: :text) end end diff --git a/spec/features/studies/manage_study_spec.rb b/spec/features/studies/manage_study_spec.rb index a6a1a094c3..a6e4b6f5de 100644 --- a/spec/features/studies/manage_study_spec.rb +++ b/spec/features/studies/manage_study_spec.rb @@ -34,8 +34,8 @@ expect(page).to have_field('HuMFre approval number', type: :text) end - it 'displays HuMFre approval number when Not Applicable (Contact Datasharing) is clicked' do - choose('Not Applicable (Contact Datasharing)', allow_label_click: true) + it 'displays HuMFre approval number when Not Applicable is clicked' do + choose('Not Applicable', allow_label_click: true) expect(page).to have_field('HuMFre approval number', type: :text) end end diff --git a/spec/features/studies/view_study_properties_spec.rb b/spec/features/studies/view_study_properties_spec.rb index a3359f72ac..b64305bacd 100644 --- a/spec/features/studies/view_study_properties_spec.rb +++ b/spec/features/studies/view_study_properties_spec.rb @@ -52,7 +52,7 @@ expect(page).to have_content('HuMFre approval number: 12345') end - it 'displays HuMFre approval number for Not Applicable (Contact Datasharing) data release strategy' do + it 'displays HuMFre approval number for Not Applicable data release strategy' do study.study_metadata.data_release_strategy = Study::DATA_RELEASE_STRATEGY_NOT_APPLICABLE study.study_metadata.data_release_timing = Study::DATA_RELEASE_TIMING_NEVER study.study_metadata.data_release_prevention_reason = Study::DATA_RELEASE_PREVENTION_REASONS[0] diff --git a/spec/models/study_spec.rb b/spec/models/study_spec.rb index e6547b6917..5f63d476fa 100644 --- a/spec/models/study_spec.rb +++ b/spec/models/study_spec.rb @@ -426,6 +426,58 @@ end end + describe '#data_release_prevention_options' do + subject { study.data_release_prevention_options } + + let(:study) { create(:study) } + + context 'when there is no existing data release prevention reason' do + it { is_expected.to eq Study::DATA_RELEASE_PREVENTION_REASONS } + end + + context 'when there is an existing data release prevention reason' do + before { study.study_metadata.data_release_prevention_reason = 'Protecting IP - DAC approval required' } + + it { is_expected.to eq Study::DATA_RELEASE_PREVENTION_REASONS } + end + + context 'when there is an existing legacy data release prevention reason' do + before { study.study_metadata.data_release_prevention_reason = 'data validity' } + + it { is_expected.to eq [*Study::DATA_RELEASE_PREVENTION_REASONS, 'data validity'] } + end + end + + describe '#data_release_delay_options' do + subject { study.data_release_delay_options } + + let(:study) { create(:study) } + + context 'when there is no existing data release delay reason' do + it { is_expected.to eq Study::DATA_RELEASE_DELAY_REASONS_STANDARD } + end + + context 'when there is an existing data release delay reason' do + before { study.study_metadata.data_release_delay_reason = 'Capacity building' } + + it { is_expected.to eq Study::DATA_RELEASE_DELAY_REASONS_STANDARD } + end + + context 'when there is an existing legacy data release delay reason' do + before { study.study_metadata.data_release_delay_reason = 'phd study' } + + it { is_expected.to eq [*Study::DATA_RELEASE_DELAY_REASONS_STANDARD, 'phd study'] } + end + + context 'when the data release delay options include assays' do + it 'includes the assay options' do + expect(study.data_release_delay_options(assay_option: true)).to eq( + [*Study::DATA_RELEASE_DELAY_REASONS_STANDARD, *Study::DATA_RELEASE_DELAY_REASONS_ASSAY] + ) + end + end + end + describe 'metadata' do let(:metadata) do { @@ -445,7 +497,7 @@ data_release_strategy: 'open', data_release_standard_agreement: 'Yes', data_release_timing: 'standard', - data_release_delay_reason: 'phd study', + data_release_delay_reason: 'PhD study', data_release_delay_period: '3 months', bam: true, data_release_delay_other_comment: 'Data Release delay other comment', @@ -456,7 +508,7 @@ ega_policy_accession_number: 'POL123456', array_express_accession_number: 'ARR123456', data_release_delay_approval: 'Yes', - data_release_prevention_reason: 'data validity', + data_release_prevention_reason: 'Protecting IP - DAC approval required', data_release_prevention_approval: 'Yes', data_release_prevention_reason_comment: 'Data Release prevention reason comment', data_access_group: 'something', @@ -713,7 +765,10 @@ create( :study, study_metadata: - create(:study_metadata, metadata.merge(data_release_timing: 'delayed', data_release_delay_reason: 'other')) + create( + :study_metadata, + metadata.merge(data_release_timing: 'delayed', data_release_delay_reason: 'Other (with free text box)') + ) ) end @@ -739,23 +794,6 @@ end end - context 'delayed for long time' do - let(:study) do - create( - :study, - study_metadata: - create( - :study_metadata, - metadata.merge(data_release_timing: 'delayed', data_release_delay_period: '6 months') - ) - ) - end - - it 'will have a data_release_delay_approval' do - expect(study.study_metadata.data_release_delay_approval).to eq(metadata[:data_release_delay_approval]) - end - end - context 'never released' do let(:never_release_fields) do { diff --git a/test/unit/data_release_test.rb b/test/unit/data_release_test.rb index f1dee7e4af..328b3bc9d4 100644 --- a/test/unit/data_release_test.rb +++ b/test/unit/data_release_test.rb @@ -93,7 +93,7 @@ class DataReleaseTest < ActiveSupport::TestCase setup do @study.study_metadata.data_release_strategy = 'never' @study.study_metadata.data_release_timing = 'never' - @study.study_metadata.data_release_prevention_reason = 'legal' + @study.study_metadata.data_release_prevention_reason = 'Protecting IP - DAC approval required' @study.study_metadata.data_release_prevention_approval = 'Yes' @study.study_metadata.data_release_prevention_reason_comment = 'It just is' end @@ -106,7 +106,7 @@ class DataReleaseTest < ActiveSupport::TestCase context 'and release timing is delayed' do setup do @study.study_metadata.data_release_timing = 'delayed' - @study.study_metadata.data_release_delay_reason = 'phd study' + @study.study_metadata.data_release_delay_reason = 'PhD study' end data_release_strategies.each do |strategy|