From ddbe51ab16853d02719a862f6081504b06b890fa Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 8 Feb 2021 15:28:35 +0100 Subject: [PATCH] Bug 27656: misc/cronjobs/longoverdue.pl better error message There are two ways of configuring misc/cronjobs/longoverdue.pl : use --lost arg or system preferencies DefaultLongOverdueLostValue and DefaultLongOverdueDays. Actually if you don't use any of it, you get a message : "ERROR: No --lost (-l) option defined" Should also say something about preferencies : "ERROR: No --lost (-l) option nor system preferencies DefaultLongOverdueLostValue/DefaultLongOverdueDays defined" Test plan: 1) Set empty preferences DefaultLongOverdueLostValue and DefaultLongOverdueDays 2) Run : misc/cronjobs/longoverdue.pl --maxdays 365 3) You see error message 4) Set DefaultLongOverdueLostValue = 1 and DefaultLongOverdueDays = 90 5) Run : misc/cronjobs/longoverdue.pl --maxdays 365 6) You don't see error message --- misc/cronjobs/longoverdue.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index 1f4a380bab..94fbe73f01 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -270,7 +270,7 @@ if ( ! defined($lost) ) { else { pod2usage( { -exitval => 1, - -msg => q|ERROR: No --lost (-l) option defined|, + -msg => q|ERROR: No --lost (-l) option nor system preferencies DefaultLongOverdueLostValue/DefaultLongOverdueDays defined|, } ); } } -- 2.30.0