From c4f4298d01b4d971cae439d30c83c66829af031d Mon Sep 17 00:00:00 2001
From: Nat Dean-Lewis <94526761+natdeanlewissoftwire@users.noreply.github.com>
Date: Mon, 23 Feb 2026 10:41:22 +0000
Subject: [PATCH] CLDC-4231: add create test log buttons for 26/27 logs (#3180)
* CLDC-4231: add create test log buttons for current and next collection years
* CLDC-4231: remove end date overrides
* CLDC-4231: allow test logs on staging
* CLDC-4231: feature flag next year test logs by allow_future_form_use?
---
.../create_log_actions_component.html.erb | 20 +++++++++++--
.../create_log_actions_component.rb | 17 +++++++++++
app/controllers/test_data_controller.rb | 28 +++++++++++++++++++
app/services/feature_toggle.rb | 2 +-
config/routes.rb | 4 +++
5 files changed, 68 insertions(+), 3 deletions(-)
diff --git a/app/components/create_log_actions_component.html.erb b/app/components/create_log_actions_component.html.erb
index 3eab0f871..130072ec0 100644
--- a/app/components/create_log_actions_component.html.erb
+++ b/app/components/create_log_actions_component.html.erb
@@ -14,17 +14,33 @@
These tools can only be seen and used in testing environments.
<%= govuk_button_link_to create_test_log_href, class: "govuk-button" do %>
- New test log
+ New <%= current_collection_year_label %> test log
<% end %>
+ <% if FeatureToggle.allow_future_form_use? %>
+ <%= govuk_button_link_to create_next_year_test_log_href, class: "govuk-button" do %>
+ New <%= next_collection_year_label %> test log
+
+ <% end %>
+ <% end %>
<%= govuk_button_link_to create_setup_test_log_href, class: "govuk-button" do %>
- New test log (setup only)
+ New <%= current_collection_year_label %> test log (setup only)
<% end %>
+ <% if FeatureToggle.allow_future_form_use? %>
+ <%= govuk_button_link_to create_next_year_setup_test_log_href, class: "govuk-button" do %>
+ New <%= next_collection_year_label %> test log (setup only)
+
+ <% end %>
+ <% end %>
<%= govuk_button_link_to create_test_bulk_upload_href(2025), class: "govuk-button govuk-button--secondary" do %>
25/26 BU test file