https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43552

            Bug ID: 43552
           Summary: Convert misc/cronjobs/gather_print_notices.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: gather_print_notices.pl uses plain Getopt::Long (GetOptions call
around line 31). No named option is required in the Getopt::Long sense. The
actual mandatory input is a positional argument, not a flag: the output
directory is taken from $ARGV[0] and validated around line 47 ("You must
specify a valid and writeable directory..."). Separately, --csv and --ods each
require exactly one --letter_code to also be given -- a cross-option
constraint, not a single required flag.

What this bug covers: convert the named options (--split, --html, --csv, --ods,
--delimiter, --letter_code, --send, --email) to the new convention for
consistency. As with runreport.pl in this same set, the positional
output-directory requirement and the csv/ods-needs-one-letter_code cross-check
don't map onto a simple per-option required constraint and will likely need to
stay as manual post-parse validation.

Test plan:
- --help output covers all documented options and matches current behavior
- Running with a valid output directory and various flag combinations still
behaves exactly as before
- Running with a missing/invalid directory, or --csv/--ods without exactly one
--letter_code, still fails with the same errors as today


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/

Reply via email to