Bugzilla – Attachment 136549 Details for
Bug 30905
Show waiting recalls in patron account on checkouts tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30905: Show waiting recalls in patron account
Bug-30905-Show-waiting-recalls-in-patron-account.patch (text/plain), 6.51 KB, created by
Katrin Fischer
on 2022-06-25 13:01:53 UTC
(
hide
)
Description:
Bug 30905: Show waiting recalls in patron account
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-06-25 13:01:53 UTC
Size:
6.51 KB
patch
obsolete
>From f473cf20915decdc52a1018f599c47b8e919909e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 6 Jun 2022 23:36:38 +0000 >Subject: [PATCH] Bug 30905: Show waiting recalls in patron account > >This enhancement shows recalls ready for pick-up on the patron's account >so they can't be missed. > >To test: >1) Enable the UseRecalls system preference and set up your >recalls-related circulation rules. >2) Check out an item to Patron B. >3) Log into the OPAC as Patron A and search for the item. >4) Place a recall on that item. Note the pickup library. >5) Go back to the staff client. At the top right of the page, confirm >your logged in library matches the recall pickup library. Set the >library to the recall pickup library if needed. >6) Check in the recalled item and confirm the recall as waiting for >Patron A. >7) Go to Patron A's account (members/moremember.pl). Confirm the recall >shows under 'Recalls waiting here' and all the information is correct. >8) Go to Patron A's checkouts (circ/circulation.pl). Confirm the recall >shows under 'Recalls waiting here' and all the information is correct. >9) Click on the menu at the top right of the page and choose 'Set >library'. Change the library to some other library. >10) Repeat steps 7 and 8, however this time the recall should show under >'Recalls waiting at other libraries'. > >Sponsored-by: Catalyst IT > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > circ/circulation.pl | 3 + > .../prog/en/includes/patron_messages.inc | 57 +++++++++++++++++++ > members/moremember.pl | 5 ++ > 3 files changed, 65 insertions(+) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 2265ffe2c7..141d313f1f 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -453,10 +453,13 @@ if ($patron) { > holds_count => $holds->count(), > WaitingHolds => $waiting_holds, > ); >+ > if ( C4::Context->preference('UseRecalls') ) { >+ my $waiting_recalls = $patron->recalls->search({ status => 'waiting' }); > $template->param( > recalls => $patron->recalls->filter_by_current->search({},{ order_by => { -asc => 'created_date' } }), > specific_patron => 1, >+ waiting_recalls => $waiting_recalls, > ); > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index 97219917e7..ecd297c744 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -129,6 +129,63 @@ > > [% END # /F ( has_modifications || warndeparture... %] > >+[% IF waiting_recalls.count %] >+ <div id="recallswaiting" class="circmessage"> >+ [% SET waiting_here = 0 %] >+ [% SET waiting_elsewhere = 0 %] >+ [% FOREACH w IN waiting_recalls %] >+ [% IF ( w.pickup_library_id == Branches.GetLoggedInBranchcode() ) %] >+ [% waiting_here = waiting_here + 1 %] >+ [% ELSE %] >+ [% waiting_elsewhere = waiting_elsewhere + 1 %] >+ [% END %] >+ [% END %] >+ >+ [% IF ( waiting_here > 0 ) %] >+ <h4>Recalls waiting here ([% waiting_here | html %])</h4> >+ <ul> >+ [% FOREACH w IN waiting_recalls %] >+ [% IF ( w.pickup_library_id == Branches.GetLoggedInBranchcode() ) %] >+ <li> >+ <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% w.biblio_id | uri %]">[% w.biblio.title | html %]</a> >+ ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]), >+ [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %] >+ [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %] >+ <span>Recall placed on [% w.created_date | $KohaDates %].</span> >+ <br /> >+ <strong class="waitinghere"> >+ [% SET expires_on = w.expiration_date %] >+ Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %] >+ </strong> >+ </li> >+ [% END %] >+ [% END %] >+ </ul> >+ [% END %] >+ >+ [% IF ( waiting_elsewhere > 0 ) %] >+ <h4>Recalls waiting at other libraries ([% waiting_elsewhere | html %])</h4> >+ <ul> >+ [% FOREACH w IN waiting_recalls %] >+ [% IF ( w.pickup_library_id != Branches.GetLoggedInBranchcode() ) %] >+ <li> >+ <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% w.biblio_id | uri %]">[% w.biblio.title | html %]</a> >+ ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]), >+ [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %] >+ [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %] >+ <span>Recall placed on [% w.created_date | $KohaDates %].</span> >+ <br /> >+ <strong> >+ [% SET expires_on = w.expiration_date %] >+ Waiting at [% Branches.GetName( w.pickup_library_id ) | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %] >+ </strong> >+ </li> >+ [% END %] >+ [% END %] >+ </ul> >+ [% END %] >+ </div> >+[% END # /IF waiting_recalls.count %] > > [% IF WaitingHolds.count %] > <div id="holdswaiting" class="circmessage"> >diff --git a/members/moremember.pl b/members/moremember.pl >index 89ec5d9af5..00e4c8e1af 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -199,6 +199,11 @@ $template->param( > WaitingHolds => $waiting_holds, > ); > >+if ( C4::Context->preference('UseRecalls') ) { >+ my $waiting_recalls = $patron->recalls->search({ status => 'waiting' }); >+ $template->param( waiting_recalls => $waiting_recalls ); >+} >+ > my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees"); > $no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees ); > if ( defined $no_issues_charge_guarantees ) { >-- >2.30.2
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 30905
:
135740
|
135752
| 136549 |
137870