Bugzilla – Attachment 45420 Details for
Bug 14134
Make "Holds over" show holds expiring tomorrow if ExpireReservesMaxPickUpDelay is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14134 - Make "Holds over" show holds expiring tomorrow if ExpireReservesMaxPickUpDelay is set
Bug-14134---Make-Holds-over-show-holds-expiring-to.patch (text/plain), 3.58 KB, created by
Kyle M Hall
on 2015-12-04 19:22:06 UTC
(
hide
)
Description:
Bug 14134 - Make "Holds over" show holds expiring tomorrow if ExpireReservesMaxPickUpDelay is set
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2015-12-04 19:22:06 UTC
Size:
3.58 KB
patch
obsolete
>From b59229b506adb4c59288142313e911402da16238 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 8 Jul 2014 10:49:50 -0500 >Subject: [PATCH] Bug 14134 - Make "Holds over" show holds expiring tomorrow > if ExpireReservesMaxPickUpDelay is set > >If ExpireReservesMaxPickUpDelay is enabled, the "holds over" tab becomes >useless. It would be nice if the "holds over" tab would display >*tomorrow's* "holds over" so the librarian can see what will be >automatically canceled over night. > >Test Plan: >1) Apply this patch >2) Enable ExpireReservesMaxPickUpDelay >3) Note the "holds over" list now displays holds that will have been > waiting more than the number of days defined in ReservesMaxPickUpDelay > as of tomorrow. > >Signed-off-by: Jason Burds <JBurds@dubuque.lib.ia.us> >--- > circ/waitingreserves.pl | 8 ++++++-- > .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 8 ++++++-- > 2 files changed, 12 insertions(+), 4 deletions(-) > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index 3e1b5c2..8fd473f 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -86,6 +86,9 @@ my @getreserves = $all_branches ? GetReservesForBranch() : GetReservesForBranch( > # get reserves for the branch we are logged into, or for all branches > > my $today = Date_to_Days(&Today); >+my $max_pickup_delay = C4::Context->preference('ReservesMaxPickUpDelay'); >+$max_pickup_delay-- if C4::Context->preference('ExpireReservesMaxPickUpDelay'); >+ > foreach my $num (@getreserves) { > next unless ($num->{'waitingdate'} && $num->{'waitingdate'} ne '0000-00-00'); > >@@ -106,9 +109,10 @@ foreach my $num (@getreserves) { > my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype > $getreserv{'waitingdate'} = $num->{'waitingdate'}; > my ( $waiting_year, $waiting_month, $waiting_day ) = split (/-/, $num->{'waitingdate'}); >+ > ( $waiting_year, $waiting_month, $waiting_day ) = > Add_Delta_Days( $waiting_year, $waiting_month, $waiting_day, >- C4::Context->preference('ReservesMaxPickUpDelay')); >+ $max_pickup_delay); > my $calcDate = Date_to_Days( $waiting_year, $waiting_month, $waiting_day ); > > $getreserv{'itemtype'} = $itemtypeinfo->{'description'}; >@@ -158,7 +162,7 @@ $template->param( > overloop => \@overloop, > overcount => $overcount, > show_date => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), >- ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay') >+ ReservesMaxPickUpDelay => $max_pickup_delay, > ); > > if ($cancelall) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >index 1d5faf4..03d0b4d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -71,8 +71,12 @@ > [% ELSE %] > <div id="resultlist" class="toptabs"> > <ul> >- <li><a href="#holdswaiting">[% reservecount %] Hold(s) waiting</a></li> >- <li><a href="#holdsover">[% overcount %] Hold(s) over</a></li> >+ <li><a href="#holdswaiting">Holds waiting: [% reservecount %]</a></li> >+ <li> >+ <a href="#holdsover"> >+ Holds waiting over [% ReservesMaxPickUpDelay %] days: [% overcount %] >+ </a> >+ </li> > </ul> > <div id="holdswaiting"> > [% IF ( reserveloop ) %] >-- >1.7.10.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 14134
:
38805
|
38809
|
45420
|
47550