From 3ad443b286f6d1f31af593db20db2d6ec92c3517 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Mon, 5 Feb 2024 16:50:32 +0000 Subject: [PATCH] Bug 35996: Make it clear that --category-code can not be used alone This patch adds a clarification to writeoff_debts.pl to make it clear that --category-code can't be used as the only filter when running the script. If this is the case, the script just displays the help menu as it is expecting one of the other filters Test plan: 1) Run perl misc/cronjobs/writeoff_debts.pl --category-code TEST --confirm 2) Observe that the help menu is displayed instead of running the script 3) Check the help menu for the text added in this patch Signed-off-by: David Nind --- misc/cronjobs/writeoff_debts.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl index 8d80818539..183de7c8a2 100755 --- a/misc/cronjobs/writeoff_debts.pl +++ b/misc/cronjobs/writeoff_debts.pl @@ -150,7 +150,9 @@ example, supplying both --added_before and --type specifies that the accountline must meet both conditions to be selected for writeoff. You must pass at least one of the filtering options for the script to run. -This is to prevent an accidental 'writeoff all' operation. +This is to prevent an accidental 'writeoff all' operation. Please note that +--category-code must be accompanied by another filter - the script will not +run if this is the only filter provided. =head1 OPTIONS -- 2.30.2