From 99442e36b36eaa2e3195b2cecaa09db715a8dafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Zermatten?= Date: Thu, 3 Sep 2026 11:24:20 +0000 Subject: [PATCH] Bug 10190: (QA follow-up): fix: prevent delay-less rule sets Since the decision was made that the add / edit trigger form should never let a trigger be created or edited to not have a delay, it follows that this must apply to the rule set reset flow as well. Retain the warning message to the user, and also disable the 'Confirm reset' button if the reset would result in delay-less sets. The same applies to the trigger deletion functionality: if deleting a trigger that is a default for all libraries would then leave any libraries with one or more delay-less rule set, block the trigger deletion (deactivate 'Confirm deletion') and inform the user. Here as well we also still display the warning message. Test plan: A) Create one or more 'Default for all libraries' triggers. B) Create one or more library-specific triggers. C) For one or more of these, add itemtype and/or category specific overrides with not delay override. D) For one or more of these, add itemtype and/or category specific overrides with a delay override. E) Select 'Reset' on a rule set with overrides of type D) and notice that the 'Confirm reset' button is enabled. F) Select 'Reset' on a rule set with overrides of type C) and notice that the 'Confirm reset' button is disabled, and that the warning message explains why reset is unavailable G) Select 'Delete' on the highest 'Default for all libraries' trigger, and notice that, where one or more library-specific overrides are of type D), 'Confirm deletion' is disabled, whereas it is otherwise enabled. H) Delete a trigger for which no override exists and confirm success. I) Delete a trigger for which only type D) overrides exist and confirm success. J) Reset a rule set for which only type D) overrides exist and confirm success. K) Reset a rule set for which no override exists and confirm success. Assisted-by: Claude Opus 5 (Anthropic) Sponsored-by: Glasgow Colleges Library Group Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim --- .../CirculationTriggersForm.vue | 4 ++-- .../CirculationTriggersFormConfirmReset.vue | 19 +++++++++++++++++++ ...lationTriggersFormConfirmTriggerDelete.vue | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersForm.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersForm.vue index 2aa6b69f56..d86dd002e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersForm.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/CirculationTriggers/CirculationTriggersForm.vue @@ -20,7 +20,7 @@