https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43553
--- Comment #1 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 206185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206185&action=edit Bug 43553: Convert holds_reminder.pl to the Getopt::Long::Descriptive convention Convert the plain Getopt::Long option parsing to Koha::Script->describe_options, per the convention established by bug 43546. --lettercode's default moves into the option spec. Also adds a Params::Validate callback requiring --date to be a valid YYYY-MM-DD date (via Koha::DateUtils::dt_from_string), replacing the existing hand-rolled eval/die check with the same validation logic, now enforced consistently during option parsing with the usual usage text on failure, matching the pattern already used for --interval on bug 43560. Dropped $opt_out, a leftover variable that was declared but never wired to any option or used anywhere in the script -- dead code predating this conversion, not a behavior change. Updated the SYNOPSIS/OPTIONS POD to use the double-dash spelling for multi-letter options (--library, --days, etc.), matching what the new --help now displays; single-letter -v/-c/-t are unchanged. Left the "-n -csv" example in USAGE EXAMPLES alone -- it refers to options this script has never had (apparently copy-pasted from a different script's docs), predates this conversion, and isn't affected by it. Test plan: 1. holds_reminder.pl --help / --man 2. holds_reminder.pl --date not-a-date Rejected: --date must be a valid date in YYYY-MM-DD format. 3. holds_reminder.pl --date 2026-01-15 -v Runs to completion as before. 4. holds_reminder.pl -v (no options) Runs to completion exactly as before (today, all branches, all waiting holds). 5. holds_reminder.pl --library CPL --days 14 -v Runs to completion exactly as before. 6. koha-qa.pl passes. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
