Bug 8577 - build_holds_queue.pl needs command-line options for help, verbosity, and summary
Summary: build_holds_queue.pl needs command-line options for help, verbosity, and summary
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2012-08-06 13:35 UTC by Owen Leonard
Modified: 2023-10-09 06:29 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-08-06 13:35:32 UTC
As per FIXME from 2009:

# FIXME: add command-line options for verbosity and summary
# FIXME: expand perldoc, explain intended logic
# FIXME: refactor all subroutines into C4 for testability

It is not user-friendly to have a command-line script which doesn't accept a --help parameter.
Comment 1 Magnus Enger 2022-01-19 10:12:59 UTC
Looks like the code has been refactored, but there are still two FIXMEs:

# FIXME: add command-line options for verbosity and summary
# FIXME: expand perldoc, explain intended logic
Comment 2 Magnus Enger 2023-10-06 07:06:52 UTC
The script also has this:

my $rthq = C4::Context->preference('RealTimeHoldsQueue');
if ( $rthq && !$force ) {
    say "RealTimeHoldsQueue system preference is enabled, holds queue not built.";
    say "Use --force to force building the holds queue.";
    exit(1);
}

Which means that if a site turns on RealTimeHoldsQueue, the script starts generating "unnecessary" output. Well, if you run the script interactively you might want this output, but not if you run it from a cronjob (which is set up hourly automatically by the Debian packages). So maybe a --quiet option to make the cronjob run without this output?
Comment 3 Katrin Fischer 2023-10-06 21:45:04 UTC
So quiet would be used to suppress the warning, while the holds queue is only rebuilt for instances with RelTimeHoldsQueue off?
Comment 4 Magnus Enger 2023-10-09 06:29:41 UTC
(In reply to Katrin Fischer from comment #3)
> So quiet would be used to suppress the warning, while the holds queue is
> only rebuilt for instances with RelTimeHoldsQueue off?

Yes, that is how I see it.