https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43549
Bug ID: 43549
Summary: Convert misc/cronjobs/cleanup_database.pl to the
Getopt::Long::Descriptive convention (see bug 43546)
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Command-line Utilities
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
Depends on: 43546
Target Milestone: ---
This is one of a set of bugs filed alongside bug 43546 (Standardize
command-line scripts on Getopt::Long::Descriptive) to convert individual,
commonly-used cron scripts to whatever declarative option-parsing convention
that bug settles on. Depends on 43546.
Current state: cleanup_database.pl uses plain Getopt::Long (GetOptions call
around line 198) with roughly 50 options. No single option is required; instead
the script requires at least one of a large set of purge-type flags to be set,
enforced by a long "unless ($sessions || $zebraqueue_days || ... )" condition
after parsing (around line 280).
What this bug covers: convert the GetOptions call to the new convention for
consistent declaration and auto-generated --help output. None of these options
map cleanly onto a simple per-option required constraint, since the actual
requirement is "at least one of roughly 50 flags", not any single mandatory
option -- that check should remain a manual post-parse validation, same as
today.
Given the option count, this is a larger and more involved conversion than the
others in this set. Suggest treating it as lower priority -- do it once the
convention is proven out on a smaller script first.
Test plan:
- --help output covers all documented options and matches current behavior
- Running with no purge flags still fails with the same "nothing to do" message
- Running with any single purge flag still behaves exactly as before
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43546
[Bug 43546] Standardize command-line scripts on Getopt::Long::Descriptive for
safer, more consistent option handling
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/