From 8f3a67b7cf3521c5b1aabebab98fc004c9252dd3 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 18 Aug 2015 08:07:33 -0400 Subject: [PATCH] Bug 8352 [QA Followup] * Add --confirm option to print_holds.pl * Modify old_reserves to match reserves Signed-off-by: Jenice Tate --- installer/data/mysql/atomicupdate/bug_8352.sql | 1 + misc/cronjobs/holds/print_holds.pl | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_8352.sql b/installer/data/mysql/atomicupdate/bug_8352.sql index 4577e1e..3b7308d 100644 --- a/installer/data/mysql/atomicupdate/bug_8352.sql +++ b/installer/data/mysql/atomicupdate/bug_8352.sql @@ -1,4 +1,5 @@ ALTER TABLE reserves ADD printed DATETIME NULL AFTER suspend_until; +ALTER TABLE old_reserves ADD printed DATETIME NULL AFTER suspend_until; INSERT INTO letter ( module, code, branchcode, name, is_html, title, content ) VALUES ( 'reserves', 'HOLD_PLACED_PRINT', '', 'Hold Placed ( Auto-Print )', '0', 'Hold Placed ( Auto-Print )', 'Hold to pull at <> diff --git a/misc/cronjobs/holds/print_holds.pl b/misc/cronjobs/holds/print_holds.pl index 32e2e15..095b068 100755 --- a/misc/cronjobs/holds/print_holds.pl +++ b/misc/cronjobs/holds/print_holds.pl @@ -39,15 +39,19 @@ use Koha::Database; my $help = 0; my $test = 0; my $verbose = 0; +my $confirm = 0; my @printers; GetOptions( "help|?" => \$help, "verbose|v" => \$verbose, "test|t" => \$test, + "confirm|c" => \$confirm, "printer|p=s" => \@printers, ); pod2usage(1) if $help; pod2usage(1) unless @printers; +pod2usage(1) unless ( $test || $confirm ); +pod2usage(1) if ( $test && $confirm ); my $schema = Koha::Database->new()->schema(); @@ -151,6 +155,14 @@ e.g. print_holds.pl --printer MPL:1 --printer CPL:2 would add printers for branchcodes MPL and CPL. If a printer is not defined for a given branch, notices for that branch will not be printed. +=item B<--test> + +Run in test mode. Holds will not actually be printed. + +=item B<--confirm> + +Run in production mode. Holds will be printed to printers. + =head1 DESCRIPTION B will print on-demand notices for items in the holds queue as they appear. -- 1.7.10.4