From 4fd97525378abce3ed51a8e4a40e1dcfbf64e2cb Mon Sep 17 00:00:00 2001 From: David Biddle Date: Tue, 7 Apr 2026 16:16:39 +0100 Subject: [PATCH 1/2] Delete TODO for 'remove Welsh' button We implemented this as part of the Welsh translations work, so this TODO comment can be removed --- app/input_objects/forms/welsh_translation_input.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/input_objects/forms/welsh_translation_input.rb b/app/input_objects/forms/welsh_translation_input.rb index 83ce7d033..7c0aca357 100644 --- a/app/input_objects/forms/welsh_translation_input.rb +++ b/app/input_objects/forms/welsh_translation_input.rb @@ -97,7 +97,6 @@ def submit # We add :cy to the available languages so that the welsh form can be # previewed. This means that if mark_complete is false, welsh form docs # will be generated. - # TODO: Add a button for removing the Welsh form form.available_languages = %w[en cy] form.save_draft! From 30ed588424d452c2b691eae599f4e114ef4f3a9e Mon Sep 17 00:00:00 2001 From: David Biddle Date: Wed, 8 Apr 2026 11:28:09 +0100 Subject: [PATCH 2/2] Reference Trello cards from TODO comments --- app/components/page_list_component/error_summary/view.rb | 1 + app/controllers/group_members_controller.rb | 3 ++- app/controllers/pages/conditions_controller.rb | 1 + app/controllers/pages/exit_page_controller.rb | 1 + app/input_objects/pages/question_input.rb | 3 ++- app/models/form.rb | 1 + app/models/page.rb | 1 + app/validators/allowed_email_domain_validator.rb | 1 + app/views/layouts/base.html.erb | 1 + app/views/pages/conditions/edit.html.erb | 1 + app/views/pages/conditions/new.html.erb | 1 + app/views/pages/secondary_skip/new.html.erb | 1 + 12 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/components/page_list_component/error_summary/view.rb b/app/components/page_list_component/error_summary/view.rb index 0cf777bd5..5b436f999 100644 --- a/app/components/page_list_component/error_summary/view.rb +++ b/app/components/page_list_component/error_summary/view.rb @@ -12,6 +12,7 @@ def self.error_id(number) def self.generate_error_message(error_name, condition:, page:) # TODO: route_number is hardcoded as 1 here because we know there can be only two conditions. It will need to change in future + # https://trello.com/c/BfkZEIgM/3446-set-route-count-dynamically-instead-of-hard-coding-it route_number = condition.secondary_skip? ? I18n.t("errors.page_conditions.route_number_for_any_other_answer") : 1 interpolation_variables = { question_number: page.position, route_number: } diff --git a/app/controllers/group_members_controller.rb b/app/controllers/group_members_controller.rb index 4d7ac7298..462d14ee2 100644 --- a/app/controllers/group_members_controller.rb +++ b/app/controllers/group_members_controller.rb @@ -32,7 +32,8 @@ def set_group end def group_member_params - ## TODO: We are passing in host here because the admin doesn't know it's own URL to use in emails + # TODO: We are passing in host here because the admin doesn't know it's own URL to use in emails + # https://trello.com/c/HkT90mFt/3447-configure-rails-apps-to-know-their-own-urls params.require(:group_member_input).permit(:member_email_address).merge(role: new_member_role, group: @group, creator: current_user, host: request.host) end diff --git a/app/controllers/pages/conditions_controller.rb b/app/controllers/pages/conditions_controller.rb index 1d7547334..843d925f3 100644 --- a/app/controllers/pages/conditions_controller.rb +++ b/app/controllers/pages/conditions_controller.rb @@ -31,6 +31,7 @@ def create redirect_to new_exit_page_path(current_form.id, page.id, answer_value: condition_input.answer_value) else # TODO: Route number is hardcoded whilst we can only have one value for it + # https://trello.com/c/BfkZEIgM/3446-set-route-count-dynamically-instead-of-hard-coding-it redirect_to show_routes_path(form_id: current_form.id, page_id: page.id), success: t("banner.success.route_created", route_number: 1) end else diff --git a/app/controllers/pages/exit_page_controller.rb b/app/controllers/pages/exit_page_controller.rb index 830c0b418..9ba623ada 100644 --- a/app/controllers/pages/exit_page_controller.rb +++ b/app/controllers/pages/exit_page_controller.rb @@ -13,6 +13,7 @@ def create if exit_page_input.submit # TODO: Route number is hardcoded whilst we can only have one value for it + # https://trello.com/c/BfkZEIgM/3446-set-route-count-dynamically-instead-of-hard-coding-it redirect_to show_routes_path(form_id: current_form.id, page_id: page.id), success: t("banner.success.exit_page_created") else render template: "pages/exit_page/new", locals: { exit_page_input:, preview_html: preview_html(exit_page_input), check_preview_validation: true }, status: :unprocessable_content diff --git a/app/input_objects/pages/question_input.rb b/app/input_objects/pages/question_input.rb index 5ef5041e3..711af7b0e 100644 --- a/app/input_objects/pages/question_input.rb +++ b/app/input_objects/pages/question_input.rb @@ -1,7 +1,8 @@ class Pages::QuestionInput < BaseInput attr_accessor :question_text, :hint_text, :is_optional, :answer_type, :draft_question, :is_repeatable, :form_id - # TODO: We could lose these attributes once we have a Check your answers page + # TODO: We could lose these attributes once we have a 'Check your question' page + # https://trello.com/c/uSkzB4Sl/3-create-check-your-question-page attr_accessor :answer_settings, :page_heading, :guidance_markdown attr_reader :selection_options # only used for displaying error diff --git a/app/models/form.rb b/app/models/form.rb index da7637e1c..2f71d4dab 100644 --- a/app/models/form.rb +++ b/app/models/form.rb @@ -229,6 +229,7 @@ def update_draft_form_document def task_status_service # TODO: refactor this in favour of dependency injection + # https://trello.com/c/TVN9BNxQ/3448-refactor-formtaskstatusservice-to-use-dependency-injection # it can also lead to use of `allow_any_instance_of` in testing @task_status_service ||= TaskStatusService.new(form: self) end diff --git a/app/models/page.rb b/app/models/page.rb index cd59b49d7..ce7d26f24 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -166,6 +166,7 @@ def destroy_secondary_skip_conditions # We want to delete the secondary skip for the page at the start of the route # That association isn't in the database, so we need to dig it out # TODO: what if the page owning the routes has more than two routes? + # https://trello.com/c/ZPFCV1C7/3462-rewrite-destroysecondaryskipconditions-to-handle-a-routing-page-with-more-than-two-routes goto_conditions .filter { |condition| condition.check_page_id == condition.routing_page_id } .map(&:check_page) diff --git a/app/validators/allowed_email_domain_validator.rb b/app/validators/allowed_email_domain_validator.rb index d2218bad5..6d1da7749 100644 --- a/app/validators/allowed_email_domain_validator.rb +++ b/app/validators/allowed_email_domain_validator.rb @@ -5,6 +5,7 @@ def validate_each(record, attribute, value) # TODO: we might not want to check against current user domain # when we have a proper allow list? + # https://trello.com/c/NQj6zljA/3449-make-email-domain-validation-check-against-allowed-domains-rather-than-just-govuk-and-the-users-current-domain if record.respond_to?(:current_user) && record.current_user.present? user_domain_with_at = record.current_user.email .then { |email| email[email.rindex("@")..] } diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 0e7bb4f5f..51a2f5ed5 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -15,6 +15,7 @@ "> <%# This manifest file and the icons it references are currently being served from the `public` folder. %> <%# TODO: update the build to either generate the manifest with references to fingerprinted assets, or automatically copy the manifest and its dependencies to `public`. %> + <%# https://trello.com/c/zXttaPrR/3450-update-frontend-build-to-handle-manifestjson-automatically %> "> diff --git a/app/views/pages/conditions/edit.html.erb b/app/views/pages/conditions/edit.html.erb index 2b588bd65..0a618bfc5 100644 --- a/app/views/pages/conditions/edit.html.erb +++ b/app/views/pages/conditions/edit.html.erb @@ -1,4 +1,5 @@ <%# TODO: route_number is hardcoded as 1 here because we know there can be only two conditions. It will need to change in the future %> +<%# https://trello.com/c/BfkZEIgM/3446-set-route-count-dynamically-instead-of-hard-coding-it %> <% set_page_title(title_with_error_prefix(t('page_titles.routing_page_edit', question_number: condition_input.page.position, route_number: 1), condition_input.errors&.any?)) %> <% content_for :back_link, govuk_back_link_to(show_routes_path(condition_input.form.id, page_id: condition_input.page.id), t(".back_link", question_number: condition_input.page.position)) %> diff --git a/app/views/pages/conditions/new.html.erb b/app/views/pages/conditions/new.html.erb index e8708c16b..2c1e0554a 100644 --- a/app/views/pages/conditions/new.html.erb +++ b/app/views/pages/conditions/new.html.erb @@ -1,4 +1,5 @@ <%# TODO: route_number is hardcoded as 1 here because we know there can be only two conditions. It will need to change in the future %> +<%# https://trello.com/c/BfkZEIgM/3446-set-route-count-dynamically-instead-of-hard-coding-it %> <% set_page_title(title_with_error_prefix(t('page_titles.routing_page_new', route_number: 1), condition_input.errors&.any?)) %> <% content_for :back_link, govuk_back_link_to(routing_page_path(condition_input.form.id, routing_page_id: condition_input.page.id)) %> diff --git a/app/views/pages/secondary_skip/new.html.erb b/app/views/pages/secondary_skip/new.html.erb index 9e2692233..0745fff10 100644 --- a/app/views/pages/secondary_skip/new.html.erb +++ b/app/views/pages/secondary_skip/new.html.erb @@ -6,6 +6,7 @@ <%= t("secondary_skip.new.caption", question_number: secondary_skip_input.page.position) %> <%= t("page_titles.new_secondary_skip", route_index: 2) %> <%# TODO: route_number is hardcoded as 2 here because we know there can be only two conditions. It will need to change in the future %> + <%# https://trello.com/c/BfkZEIgM/3446-set-route-count-dynamically-instead-of-hard-coding-it %> <% end %>