Bugzilla – Attachment 13603 Details for
Bug 8367
How long is a hold waiting for pickup at a more granular level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8367: Add more granular level for ReservesMaxPickUpDelay
Bug-8367-Add-more-granular-level-for-ReservesMaxPi.patch (text/plain), 24.77 KB, created by
Kyle M Hall (khall)
on 2012-11-21 17:16:34 UTC
(
hide
)
Description:
Bug 8367: Add more granular level for ReservesMaxPickUpDelay
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-11-21 17:16:34 UTC
Size:
24.77 KB
patch
obsolete
>From 1d194b4d42e7e615446b20d55e9e9e3fa71e43a5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 10 Sep 2012 17:06:00 +0200 >Subject: [PATCH] Bug 8367: Add more granular level for ReservesMaxPickUpDelay > >This patch adds: >- a new column in the issuing rules >- a new field issuingrules.holdspickupdelay > >You can now specify a pickup delay for an hold function of a patron >category and/or a item type and/or a library. > >To test: >Check there is no regression with a normal reserve workflow. >Add one or more issuingrules. >In 4 templates, you can see the max pickup delay for an hold >(circ/circulation.tt, circ/waitingreserves.tt, members/moremember.tt, >opac-user.tt). > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Reserves.pm | 83 +++++++++++++++++++- > admin/smart-rules.pl | 9 +- > circ/circulation.pl | 4 + > circ/waitingreserves.pl | 52 ++++++------- > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 9 ++ > .../prog/en/modules/admin/smart-rules.tt | 9 ++- > .../prog/en/modules/circ/circulation.tt | 4 +- > .../prog/en/modules/circ/waitingreserves.tt | 11 ++- > .../prog/en/modules/members/moremember.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 +- > members/moremember.pl | 1 + > opac/opac-user.pl | 7 +- > 13 files changed, 145 insertions(+), 49 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 1dc6f72..ff391f3 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -23,6 +23,7 @@ package C4::Reserves; > > use strict; > #use warnings; FIXME - Bug 2505 >+use Date::Calc qw( Add_Delta_Days ); > use C4::Context; > use C4::Biblio; > use C4::Members; >@@ -116,7 +117,7 @@ BEGIN { > > &CheckReserves > &CanBookBeReserved >- &CanItemBeReserved >+ &CanItemBeReserved > &CancelReserve > &CancelExpiredReserves > >@@ -130,6 +131,9 @@ BEGIN { > &ReserveSlip > &ToggleSuspend > &SuspendAll >+ &GetMaxPickupDelay >+ &GetMaxPickupDate >+ &GetReservesControlBranch > ); > @EXPORT_OK = qw( MergeHolds ); > } >@@ -497,6 +501,79 @@ sub CanItemBeReserved{ > return 0; > } > } >+ >+=item GetMaxPickupDelay >+ >+$resallowed = &GetMaxPickupDelay($borrowernumber, $item) >+ >+this function return the max delay for an hold >+ >+=cut >+ >+sub GetMaxPickupDelay { >+ my ( $borrowernumber, $item ) = @_; >+ >+ my $dbh = C4::Context->dbh; >+ my $allowedreserves = 0; >+ >+ my $borrower = C4::Members::GetMember( 'borrowernumber' => $borrowernumber ); >+ >+ my $controlbranch = GetReservesControlBranch( $borrower, $item ); >+ >+ my $issuingrule = C4::Circulation::GetIssuingRule( $borrower->{categorycode}, $item->{itype}, $controlbranch ); >+ >+ return $issuingrule->{holdspickupdelay} >+ if defined($issuingrule) >+ and defined $issuingrule->{holdspickupdelay}; >+ >+ # if nothing found, return the syspref value >+ return C4::Context->preference("ReservesMaxPickUpDelay") || 0; >+} >+ >+=item GetMaxPickupDate >+ >+$maxpickupdate = &GetMaxPickupDate($item, $borrowernumber); >+$item->{waitingdate} is a string or a DateTime. >+ >+this function returns the max pickup date (DateTime format). >+(e.g. : the date after which the hold will be considered cancelled) >+ >+=cut >+ >+sub GetMaxPickupDate { >+ my ( $item, $borrowernumber ) = @_; >+ return unless $item->{waitingdate}; >+ >+ my $date = ref $item->{waitingdate} eq 'DateTime' >+ ? $item->{waitingdate} >+ : dt_from_string $item->{waitingdate}; >+ >+ my $delay = GetMaxPickupDelay( $borrowernumber, $item ); >+ $date->add( days => $delay ); >+ return $date; >+} >+ >+=item GetReservesControlBranch >+ >+$branchcode = &GetReservesControlBranch($borrower, $item) >+ >+Returns the branchcode to consider to check hold rules against >+ >+=cut >+ >+sub GetReservesControlBranch { >+ my ( $borrower, $item ) = @_; >+ my $controlbranch = C4::Context->preference('ReservesControlBranch'); >+ my $hbr = C4::Context->preference('HomeOrHoldingBranch') || "homebranch"; >+ my $branchcode = "*"; >+ if ( $controlbranch eq "ItemHomeLibrary" ) { >+ $branchcode = $item->{$hbr}; >+ } elsif ( $controlbranch eq "PatronLibrary" ) { >+ $branchcode = $borrower->{branchcode}; >+ } >+ return $branchcode; >+} >+ > #-------------------------------------------------------------------------------- > =head2 GetReserveCount > >@@ -882,8 +959,10 @@ sub CancelExpiredReserves { > while ( my $res = $sth->fetchrow_hashref() ) { > CancelReserve( $res->{'biblionumber'}, '', $res->{'borrowernumber'} ); > } >- >+ > # Cancel reserves that have been waiting too long >+ # FIXME The only way I see to do this job with the issuingrules.holdspickupdelay value would be to >+ # get all reserves and to get the related borrower and item. So we could call GetMaxPickupDelay for each reserve. > if ( C4::Context->preference("ExpireReservesMaxPickUpDelay") ) { > my $max_pickup_delay = C4::Context->preference("ReservesMaxPickUpDelay"); > my $charge = C4::Context->preference("ExpireReservesMaxPickUpDelayCharge"); >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index c221d71..2cd7c11 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -101,8 +101,8 @@ elsif ($op eq 'delete-branch-item') { > # save the values entered > elsif ($op eq 'add') { > my $sth_search = $dbh->prepare('SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?'); >- my $sth_insert = $dbh->prepare('INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, lengthunit, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount, overduefinescap) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'); >- my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, lengthunit = ?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, overduefinescap=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); >+ my $sth_insert = $dbh->prepare('INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, holdspickupdelay, issuelength, lengthunit, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount, overduefinescap) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'); >+ my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, holdspickupdelay=?, issuelength=?, lengthunit = ?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, overduefinescap=? WHERE branchcode=? AND categorycode=? AND itemtype=?"); > > my $br = $branch; # branch > my $bor = $input->param('categorycode'); # borrower category >@@ -114,6 +114,7 @@ elsif ($op eq 'add') { > my $maxissueqty = $input->param('maxissueqty'); > my $renewalsallowed = $input->param('renewalsallowed'); > my $reservesallowed = $input->param('reservesallowed'); >+ my $holdspickupdelay = $input->param('holdspickupdelay'); > $maxissueqty =~ s/\s//g; > $maxissueqty = undef if $maxissueqty !~ /^\d+/; > my $issuelength = $input->param('issuelength'); >@@ -128,9 +129,9 @@ elsif ($op eq 'add') { > $sth_search->execute($br,$bor,$cat); > my $res = $sth_search->fetchrow_hashref(); > if ($res->{total}) { >- $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$lengthunit, $hardduedate,$hardduedatecompare,$rentaldiscount,$overduefinescap, $br,$bor,$cat); >+ $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $holdspickupdelay, $issuelength,$lengthunit, $hardduedate,$hardduedatecompare,$rentaldiscount,$overduefinescap, $br,$bor,$cat); > } else { >- $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$lengthunit,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$overduefinescap); >+ $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed, $holdspickupdelay, $issuelength,$lengthunit,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$overduefinescap); > } > } > elsif ($op eq "set-branch-defaults") { >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 91fd1a2..49a9a34 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -368,6 +368,10 @@ if ($borrowernumber) { > if ( $num_res->{'found'} eq 'W' ) { > $getreserv{color} = 'reserved'; > $getreserv{waiting} = 1; >+ my $maxpickupdate = GetMaxPickupDate( $num_res, $borrowernumber ); >+ $getWaitingReserveInfo{maxpickupdate} = $maxpickupdate; >+ $getreserv{maxpickupdate} = $maxpickupdate; >+ > # genarate information displaying only waiting reserves > $getWaitingReserveInfo{title} = $getiteminfo->{'title'}; > $getWaitingReserveInfo{biblionumber} = $getiteminfo->{'biblionumber'}; >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index ec3feb5..ab8bac3 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -21,23 +21,20 @@ > use strict; > use warnings; > use CGI; >+use DateTime; > use C4::Context; > use C4::Output; > use C4::Branch; # GetBranchName > use C4::Auth; > use C4::Dates qw/format_date/; > use C4::Circulation; >+use C4::Reserves; > use C4::Members; > use C4::Biblio; > use C4::Items; >- >-use Date::Calc qw( >- Today >- Add_Delta_Days >- Date_to_Days >-); > use C4::Reserves; > use C4::Koha; >+use Koha::DateUtils; > > my $input = new CGI; > >@@ -86,7 +83,7 @@ my ($reservcount, $overcount); > my @getreserves = $all_branches ? GetReservesForBranch() : GetReservesForBranch($default); > # get reserves for the branch we are logged into, or for all branches > >-my $today = Date_to_Days(&Today); >+my $today = dt_from_string; > foreach my $num (@getreserves) { > next unless ($num->{'waitingdate'} && $num->{'waitingdate'} ne '0000-00-00'); > >@@ -105,12 +102,25 @@ foreach my $num (@getreserves) { > $gettitle->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $gettitle->{'itype'} : $gettitle->{'itemtype'}; > my $getborrower = GetMember(borrowernumber => $num->{'borrowernumber'}); > my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype >- $getreserv{'waitingdate'} = format_date( $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')); >- my $calcDate = Date_to_Days( $waiting_year, $waiting_month, $waiting_day ); >+ >+ if ( $num->{waitingdate} ) { >+ my $maxpickupdate = GetMaxPickupDate( $num, $borrowernumber ); >+ $getreserv{waitingdate} = $num->{waitingdate}; >+ $getreserv{maxpickupdate} = $maxpickupdate; >+ if ( DateTime->compare( $today, $maxpickupdate ) == 1 ) { >+ if ($cancelall) { >+ my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); >+ push @cancel_result, $res if $res; >+ next; >+ } else { >+ push @overloop, \%getreserv; >+ $overcount++; >+ } >+ }else{ >+ push @reservloop, \%getreserv; >+ $reservcount++; >+ } >+ } > > $getreserv{'itemtype'} = $itemtypeinfo->{'description'}; > $getreserv{'title'} = $gettitle->{'title'}; >@@ -131,21 +141,6 @@ foreach my $num (@getreserves) { > if ( $getborrower->{'emailaddress'} ) { > $getreserv{'borrowermail'} = $getborrower->{'emailaddress'}; > } >- >- if ($today > $calcDate) { >- if ($cancelall) { >- my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); >- push @cancel_result, $res if $res; >- next; >- } else { >- push @overloop, \%getreserv; >- $overcount++; >- } >- }else{ >- push @reservloop, \%getreserv; >- $reservcount++; >- } >- > } > > $template->param(cancel_result => \@cancel_result) if @cancel_result; >@@ -156,7 +151,6 @@ $template->param( > overcount => $overcount, > show_date => format_date(C4::Dates->today('iso')), > dateformat => C4::Context->preference("dateformat"), >- ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay') > ); > > if ($cancelall) { >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index c0d9936..7a46fca 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1017,6 +1017,7 @@ CREATE TABLE `issuingrules` ( -- circulation and fine rules > `hardduedatecompare` tinyint NOT NULL default "0", -- type of hard due date (1 = after, 0 = on, -1 = before) > `renewalsallowed` smallint(6) NOT NULL default "0", -- how many renewals are allowed > `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed >+ `holdspickupdelay` int(11) default NULL, -- after how many days a hold is problematic (in days) > `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode) > overduefinescap decimal default NULL, -- the maximum amount of an overdue fine > PRIMARY KEY (`branchcode`,`categorycode`,`itemtype`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 964df0c..c06f91d 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6062,6 +6062,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.09.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do(qq{ >+ ALTER TABLE issuingrules ADD COLUMN holdspickupdelay INT(11) NULL default NULL AFTER reservesallowed; >+ }); >+ >+ print "Upgrade to $DBversion done (Add colum issuingrules.holdspickupdelay)\n"; >+ SetVersion($DBversion); >+} > > =head1 FUNCTIONS > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index a025fe1..8b519cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -76,8 +76,9 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <th>Suspension in days (day)</th> > <th>Renewals allowed (count)</th> > <th>Holds allowed (count)</th> >- <th>Rental discount (%)</th> >- <th> </th> >+ <th>Holds pickup delay (day)</th> >+ <th>Rental discount (%)</th> >+ <th> </th> > </tr> > [% FOREACH rule IN rules %] > [% UNLESS ( loop.odd ) %] >@@ -121,6 +122,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td>[% rule.finedays %]</td> > <td>[% rule.renewalsallowed %]</td> > <td>[% rule.reservesallowed %]</td> >+ <td>[% rule.holdspickupdelay %]</td> > <td>[% rule.rentaldiscount %]</td> > <td> > <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]">Delete</a> >@@ -167,7 +169,8 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td><input name="finedays" size="3" /> </td> > <td><input name="renewalsallowed" size="2" /></td> > <td><input name="reservesallowed" size="2" /></td> >- <td><input name="rentaldiscount" size="2" /></td> >+ <td><input name="holdspickupdelay" size="2" /></td> >+ <td><input name="rentaldiscount" size="2" /></td> > <td><input type="hidden" name="branch" value="[% current_branch %]"/><input type="submit" value="Add" class="submit" /></td> > </tr> > </table> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index ee3a666..ab71b8a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -685,7 +685,7 @@ No patron matched <span class="ex">[% message %]</span> > <h4>Holds waiting:</h4> > [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %] > <ul> >- <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title |html %]</a> ([% WaitingReserveLoo.itemtype %]), [% IF ( WaitingReserveLoo.author ) %]by [% WaitingReserveLoo.author %][% END %] Hold placed on [% WaitingReserveLoo.reservedate %]. >+ <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title |html %]</a> ([% WaitingReserveLoo.itemtype %]), [% IF ( WaitingReserveLoo.author ) %]by [% WaitingReserveLoo.author %][% END %] Hold placed on [% WaitingReserveLoo.reservedate %] waiting until [% WaitingReserveLoo.maxpickupdate | $KohaDates %]. > [% IF ( WaitingReserveLoo.waitingat ) %] > <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong> > [% END %] >@@ -1059,7 +1059,7 @@ No patron matched <span class="ex">[% message %]</span> > <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reservloo.biblionumber %]"><strong>[% reservloo.title |html %]</strong></a>[% IF ( reservloo.author ) %], by [% reservloo.author %][% END %]</td> > <td>[% reservloo.itemcallnumber %]</td> > <td><em>[% IF ( reservloo.barcodereserv ) %]Item [% reservloo.barcodereserv %] >- [% END %][% IF ( reservloo.waiting ) %] <strong>waiting at [% reservloo.waitingat %]</strong> >+ [% END %][% IF ( reservloo.waiting ) %] <strong>waiting at [% reservloo.waitingat %][% IF reservloo.maxpickupdate %] until [% reservloo.maxpickupdate | $KohaDates %][% END %]</strong> > [% END %] > [% IF ( reservloo.transfered ) %] <strong>in transit</strong> from > [% reservloo.frombranch %] since [% reservloo.datesent %] >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 cb18a4a..460d24c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -1,3 +1,4 @@ >+[% USE KohaDates %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Holds awaiting pickup</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -79,7 +80,7 @@ $.tablesorter.addParser({ > [% IF ( reserveloop ) %] > <table id="holdst"> > <thead><tr> >- <th>Available since</th> >+ <th>Available since-until</th> > <th>Title</th> > <th>Patron</th> > <th>Location</th> >@@ -89,7 +90,7 @@ $.tablesorter.addParser({ > </tr></thead> > <tbody>[% FOREACH reserveloo IN reserveloop %] > <tr> >- <td><p>[% reserveloo.waitingdate %]</p></td> >+ <td><p>[% reserveloo.waitingdate | $KohaDates %] - [% reserveloo.maxpickupdate | $KohaDates %]</p></td> > <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] > [% reserveloo.title |html %] [% reserveloo.subtitle |html %] > </a> >@@ -124,7 +125,7 @@ $.tablesorter.addParser({ > [% END %] > </div> > <div id="holdsover"> >- <p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p> >+ <p>Holds listed here have been awaiting pickup for too many days.</p> > [% IF ( overloop ) %] > <p> > <form name="cancelAllReserve" action="waitingreserves.pl" method="post"> >@@ -139,7 +140,7 @@ $.tablesorter.addParser({ > <br/> > <table id="holdso"> > <thead><tr> >- <th>Available since</th> >+ <th>Available since-until</th> > <th>Title</th> > <th>Patron</th> > <th>Location</th> >@@ -149,7 +150,7 @@ $.tablesorter.addParser({ > </tr></thead> > <tbody>[% FOREACH overloo IN overloop %] > <tr> >- <td><p>[% overloo.waitingdate %]</p></td> >+ <td><p>[% overloo.waitingdate | $KohaDates %] - [% overloo.maxpickupdate | $KohaDates %]</p></td> > <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %] [% overloo.subtitle |html %] > </a> > [% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %] (<b>[% overloo.itemtype %]</b>)[% END %][% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 4e6271f..80b972b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -615,7 +615,7 @@ function validate1(date) { > </td> > <td>[% reservloo.itemcallnumber %]</td> > <td>[% IF ( reservloo.waiting ) %] >- <em>Item is <strong>waiting</strong></em> >+ <em>Item is <strong>waiting</strong> until [% reservloo.maxpickupdate %]</em> > [% END %] > [% IF ( reservloo.transfered ) %] > <em>Item <strong>in transit</strong> from >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index 43b8329..763bf27 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -385,7 +385,7 @@ $.tablesorter.addParser({ > [% IF ( RESERVE.wait ) %] > [% IF ( RESERVE.atdestination ) %] > [% IF ( RESERVE.found ) %] >- Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %] >+ Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %] until [% RESERVE.maxpickupdate | $KohaDates %][% END %] > <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" /> > [% ELSE %] > Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b> >diff --git a/members/moremember.pl b/members/moremember.pl >index 0524ecb..0e4610a 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -290,6 +290,7 @@ if ($borrowernumber) { > if ( $num_res->{'found'} eq 'W' ) { > $getreserv{color} = 'reserved'; > $getreserv{waiting} = 1; >+ $getreserv{maxpickupdate} = GetMaxPickupDate( $num_res, $borrowernumber ); > } > > # check transfers with the itemnumber foud in th reservation loop >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index eee3d38..52ac76b 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -257,10 +257,13 @@ foreach my $res (@reserves) { > if ( $res->{'expirationdate'} eq '0000-00-00' ) { > $res->{'expirationdate'} = ''; > } >- >+ > my $publictype = $res->{'publictype'}; > $res->{$publictype} = 1; >- $res->{'waiting'} = 1 if $res->{'found'} eq 'W'; >+ if ( $res->{found} eq 'W' ) { >+ $res->{waiting} = 1; >+ $res->{maxpickupdate} = GetMaxPickupDate( $res, $borrowernumber ); >+ } > $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'}; > my $biblioData = GetBiblioData($res->{'biblionumber'}); > $res->{'reserves_title'} = $biblioData->{'title'}; >-- >1.7.2.5
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 8367
:
12130
|
13139
|
13602
|
13603
|
13604
|
13624
|
15334
|
15335
|
15369
|
15498
|
15613
|
15658
|
15659
|
19093
|
19094
|
19095
|
19096
|
19104
|
19105
|
19107
|
19108
|
19116
|
19180
|
19181
|
19182
|
19360
|
19361
|
19362
|
20300
|
20301
|
20302
|
20303
|
20304
|
32786
|
32826
|
32884
|
32885
|
32916
|
32930
|
42706
|
42754
|
79790
|
79791
|
79798
|
79799
|
79800
|
79853
|
79854
|
79855
|
79859
|
92412
|
92413
|
92414
|
92415
|
92416
|
92417
|
92418
|
92419
|
92420
|
92421
|
92422
|
92423
|
92424
|
92425
|
92426
|
92427
|
92428
|
92958
|
92959
|
92960
|
92961
|
103425
|
113211
|
117284
|
118017
|
118021
|
124568
|
125087
|
131299
|
131300
|
131301
|
131302
|
131646
|
131647
|
131718
|
131719
|
131720
|
131722
|
131723
|
131724
|
133089
|
133090
|
133091
|
133092
|
133093
|
133094
|
142897
|
142898
|
142899
|
142900
|
142901
|
142902
|
142903
|
144097
|
144098
|
144099
|
144100
|
144101
|
144102
|
144103
|
144146
|
145644
|
145657
|
147798
|
147799
|
147800
|
147801
|
147802
|
147803
|
147804
|
147805
|
147806
|
147807
|
148536
|
148537
|
148538
|
148539
|
148540
|
148541
|
148542
|
148543
|
148544
|
148545
|
150437
|
150438
|
150439
|
153235
|
153237
|
153238
|
153239
|
153240
|
153241
|
153242
|
153243
|
153244
|
153245
|
153246
|
157138
|
157139
|
157140
|
157141
|
157142
|
157143
|
157144
|
157145
|
157146
|
157147
|
157148
|
157149
|
157150
|
157298
|
157343
|
157344
|
157345
|
157346
|
157347
|
157348
|
157349
|
157350
|
157351
|
157352
|
157354
|
157355
|
157356
|
157697
|
157698
|
157699
|
157700
|
157701
|
157702
|
157703
|
157704
|
157705
|
157706
|
157707
|
157708
|
157709
|
157715
|
158023
|
158024
|
158025
|
158026
|
158027
|
158028
|
158029
|
158030
|
158031
|
158032
|
158033
|
158034
|
158035
|
158254
|
158255