From a00aa02d31aa290d78da313365872041ef01ea7f Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Tue, 1 Aug 2023 14:14:39 +0100 Subject: [PATCH] Update messages --- .../future_content_change_statistics_report.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/reports/future_content_change_statistics_report.rb b/lib/reports/future_content_change_statistics_report.rb index d4b73a975..7ba25c356 100644 --- a/lib/reports/future_content_change_statistics_report.rb +++ b/lib/reports/future_content_change_statistics_report.rb @@ -22,7 +22,7 @@ def call government_document_supertype: supertypes(content_item)["government_document_supertype"], ).lists - output_string = "Changes to #{govuk_path} will trigger alerts on these lists:\n" + output_string = change_messages list_names_array(lists).each { |ln| output_string += " - #{ln}\n" } @@ -33,6 +33,20 @@ def call output_string end + def change_messages + if draft + [ + "Publishing the drafted changes to #{govuk_path} will trigger alerts on these lists:\n", + "(NB: publishing as a minor change will not trigger alerts)", + ] + else + [ + "Publishing major changes to the information on #{govuk_path} will trigger alerts on these lists:\n", + "(NB: If major changes involve changes to the taxons/links/etc these lists will change)\n", + ] + end + end + def content_store_client return GdsApi.content_store unless draft