diff --git a/app/components/check_answers_summary_list_card_component.rb b/app/components/check_answers_summary_list_card_component.rb index c63743977..62469e324 100644 --- a/app/components/check_answers_summary_list_card_component.rb +++ b/app/components/check_answers_summary_list_card_component.rb @@ -18,7 +18,7 @@ class CheckAnswersSummaryListCardComponent < ViewComponent::Base end def get_question_label(question) - [question.question_number_string(false), question.check_answer_label.to_s.presence || question.header.to_s].compact.join(" - ") + [question.question_number_string, question.check_answer_label.to_s.presence || question.header.to_s].compact.join(" - ") end def check_answers_card_title(question) diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index 8cdcbe7d2..a29ab98d0 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -47,6 +47,6 @@ private end def get_question_label(question) - [question.question_number_string(false), question.check_answer_label.to_s.presence || question.header.to_s].compact.join(" - ") + [question.question_number_string, question.check_answer_label.to_s.presence || question.header.to_s].compact.join(" - ") end end diff --git a/app/helpers/question_view_helper.rb b/app/helpers/question_view_helper.rb index 4f7276546..d40b3cd35 100644 --- a/app/helpers/question_view_helper.rb +++ b/app/helpers/question_view_helper.rb @@ -7,7 +7,7 @@ module QuestionViewHelper def legend(question, page_header, conditional) { - text: [question.question_number_string(conditional), question.header.html_safe].compact.join(" - "), + text: [question.question_number_string(conditional:), question.header.html_safe].compact.join(" - "), size: label_size(page_header, conditional), tag: label_tag(page_header, conditional), } diff --git a/app/models/form/question.rb b/app/models/form/question.rb index b8abddd42..9ddacd68b 100644 --- a/app/models/form/question.rb +++ b/app/models/form/question.rb @@ -259,8 +259,8 @@ class Form::Question selected_answer_option_is_derived?(log) || has_inferred_check_answers_value?(log) end - def question_number_string(conditional) - if @question_number && !conditional + def question_number_string(conditional: false) + if @question_number && !conditional && form.start_date.year >= 2023 "Q#{@question_number}" end end