Bugzilla – Attachment 68311 Details for
Bug 16187
Add a script to cancel unfilled holds after a specified number of days
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16187: (QA follow-up) Additional fixes
Bug-16187-QA-follow-up-Additional-fixes.patch (text/plain), 1.97 KB, created by
Marcel de Rooy
on 2017-10-20 06:22:01 UTC
(
hide
)
Description:
Bug 16187: (QA follow-up) Additional fixes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-20 06:22:01 UTC
Size:
1.97 KB
patch
obsolete
>From 01968368e8f1ed70bc0385f5cf3df5f2a633823b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 20 Oct 2017 08:11:38 +0200 >Subject: [PATCH] Bug 16187: (QA follow-up) Additional fixes >Content-Type: text/plain; charset=utf-8 > >Fix: >Can't locate object method "next" via package "13" (perhaps you forgot to load "13"?) at misc/cronjobs/holds/cancel_unfilled_holds.pl line 119. >Undefined subroutine &main::CancelReserve called at misc/cronjobs/holds/cancel_unfilled_holds.pl line 143. > >The script does not use Koha::Object's get_column correctly for getting >the branch codes. >The call to CancelReserve is obsolete. Was moved in the meantime to >Koha::Hold->cancel. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/cronjobs/holds/cancel_unfilled_holds.pl | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > >diff --git a/misc/cronjobs/holds/cancel_unfilled_holds.pl b/misc/cronjobs/holds/cancel_unfilled_holds.pl >index 29e7472..08c2029 100755 >--- a/misc/cronjobs/holds/cancel_unfilled_holds.pl >+++ b/misc/cronjobs/holds/cancel_unfilled_holds.pl >@@ -112,12 +112,7 @@ warn "Running in test mode, no actions will be taken" unless ($confirm); > > $verbose and warn "Looking for unfilled holds placed $days or more days ago\n"; > >-unless ( scalar @branchcodes > 0 ) { >- my $branches = Koha::Libraries->search->get_column('branchcode'); >- while ( my $branch = $branches->next ) { >- push @branchcodes, $branch->branchcode; >- } >-} >+@branchcodes = Koha::Libraries->search->get_column('branchcode') if !@branchcodes; > $verbose and warn "Running for branch(es): " . join( "|", @branchcodes ) . "\n"; > > foreach my $branch (@branchcodes) { >@@ -144,7 +139,7 @@ foreach my $branch (@branchcodes) { > . $hold->borrowernumber > . " on biblio: " > . $hold->biblionumber . "\n"; >- CancelReserve( { reserve_id => $hold->reserve_id } ) if $confirm; >+ $hold->cancel if $confirm; > } > > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16187
:
53397
|
56275
|
61173
|
61951
|
64924
|
68289
|
68290
|
68309
|
68310
| 68311