Bugzilla – Attachment 31601 Details for
Bug 12892
Holds Waiting: not showing from check out screen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12892 - Holds Waiting: not showing from check out screen
Bug-12892---Holds-Waiting-not-showing-from-check-o.patch (text/plain), 5.61 KB, created by
Kyle M Hall (khall)
on 2014-09-15 12:36:59 UTC
(
hide
)
Description:
Bug 12892 - Holds Waiting: not showing from check out screen
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-09-15 12:36:59 UTC
Size:
5.61 KB
patch
obsolete
>From 616bbb9f7ae6a69d059d787eb6ff136e467335f7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 15 Sep 2014 07:46:05 -0400 >Subject: [PATCH] Bug 12892 - Holds Waiting: not showing from check out screen > >When a patron has holds waiting to be pick up, they used to show in the >check out screen. These notifications are no longer showing in 3.16. > >Test Plan: >1) Apply this patch >2) Create a hold, set to waiting >3) Browse to circulation.pl for that patron >4) Note you see the list of waiting holds >5) Switch you logged in branch to a different branch >6) Note the "Waiting at" line is no longer emphasized. >--- > Koha/Schema/Result/Reserve.pm | 12 ++++++ > Koha/Schema/ResultSet/Reserve.pm | 23 ++++++++++++ > circ/circulation.pl | 6 ++- > .../prog/en/modules/circ/circulation.tt | 36 ++++++++++++-------- > 4 files changed, 61 insertions(+), 16 deletions(-) > create mode 100644 Koha/Schema/ResultSet/Reserve.pm > >diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm >index 16f951b..6041d52 100644 >--- a/Koha/Schema/Result/Reserve.pm >+++ b/Koha/Schema/Result/Reserve.pm >@@ -313,4 +313,16 @@ __PACKAGE__->belongs_to( > }, > ); > >+__PACKAGE__->belongs_to( >+ "branch", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ > 1; >diff --git a/Koha/Schema/ResultSet/Reserve.pm b/Koha/Schema/ResultSet/Reserve.pm >new file mode 100644 >index 0000000..e656f88 >--- /dev/null >+++ b/Koha/Schema/ResultSet/Reserve.pm >@@ -0,0 +1,23 @@ >+package Koha::Schema::ResultSet::Reserve; >+ >+use Modern::Perl; >+ >+use Carp; >+ >+use base 'DBIx::Class::ResultSet'; >+ >+sub GetWaiting { >+ my ( $self, $params ) = @_; >+ >+ my $borrowernumber = $params->{borrowernumber}; >+ croak("No borrowernumber passed in to Koha::Schema::ResultSet::Reserve::GetWaiting") unless $borrowernumber; >+ >+ return $self->search( >+ { >+ borrowernumber => $borrowernumber, >+ found => 'W', >+ } >+ ); >+} >+ >+1; >diff --git a/circ/circulation.pl b/circ/circulation.pl >index c766e88..f3cbe1d 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -362,9 +362,11 @@ if ($borrowernumber) { > # BUILD HTML > # show all reserves of this borrower, and the position of the reservation .... > if ($borrowernumber) { >+ my $holds_rs = Koha::Database->new()->schema()->resultset('Reserve'); > $template->param( >- holds_count => Koha::Database->new()->schema()->resultset('Reserve') >- ->count( { borrowernumber => $borrowernumber } ) ); >+ holds_count => $holds_rs->count( { borrowernumber => $borrowernumber } ), >+ WaitingHolds => $holds_rs->GetWaiting( { borrowernumber => $borrowernumber } ) >+ ); > > $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' ); > } >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 9734c0f..9a99c59 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -596,20 +596,28 @@ No patron matched <span class="ex">[% message %]</span> > </ul> > </div> > >- [% IF ( WaitingReserveLoop ) %] >- <div id="holdswaiting" class="circmessage"> >- <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 %] [% IF ( WaitingReserveLoo.itemcallnumber ) %][[% WaitingReserveLoo.itemcallnumber %]] [% END %]Hold placed on [% WaitingReserveLoo.reservedate %]. >- [% IF ( WaitingReserveLoo.waitingat ) %] >- <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong> >- [% END %] >- </li> >- </ul> >- [% END %] >- </div> >- <!-- /If WaitingReserveLoop -->[% END %] >+ [% IF ( WaitingHolds ) %] >+ <div id="holdswaiting" class="circmessage"> >+ <h4>Holds waiting:</h4> >+ [% FOREACH w IN WaitingHolds %] >+ <ul> >+ <li> >+ <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a> >+ ([% w.item.effective_itemtype %]), >+ [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %] >+ [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %] >+ Hold placed on [% w.reservedate | $KohaDates %]. >+ >+ <br/> >+ [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %] >+ Waiting at [% w.branch.branchname %] >+ </strong> >+ </li> >+ </ul> >+ [% END %] >+ </div> >+ [% END %] >+ > [% IF ( notes ) %] > <div id="circnotes" class="circmessage"> > <h4>Notes:</h4> >-- >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 12892
:
31471
|
31472
|
31581
|
31600
|
31601
|
31603
|
31604
|
31605
|
31607
|
31608
|
31670
|
31671
|
31672
|
31962
|
31963
|
32010
|
32017
|
32044
|
32057
|
32066
|
32069
|
33222
|
33225
|
33236
|
33275