Bugzilla – Attachment 145156 Details for
Bug 32272
Last borrower and previous borrower display on moredetail.pl is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32272: Restore last and previous borrowers on moredetail
Bug-32272-Restore-last-and-previous-borrowers-on-m.patch (text/plain), 4.16 KB, created by
Lucas Gass (lukeg)
on 2023-01-09 17:59:45 UTC
(
hide
)
Description:
Bug 32272: Restore last and previous borrowers on moredetail
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-01-09 17:59:45 UTC
Size:
4.16 KB
patch
obsolete
>From f4aa7a2910eafdd777591dac61b559f35320e7aa Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Fri, 6 Jan 2023 14:26:03 -0700 >Subject: [PATCH] Bug 32272: Restore last and previous borrowers on moredetail > >GetItemsInfo added a card0, card1 and card2 info with the cardnumbers of >the last 3 borrowers. >But 31315 forgot to adjust the code when it has been moved to using >Koha::Items > >Test plan: >Check an item in and out to several patrons >Go to the moredetail page (items) and confirm that the "last borrowers" >info is displayed > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > catalogue/moredetail.pl | 9 ++++++++ > .../prog/en/modules/catalogue/moredetail.tt | 23 +++++++------------ > 2 files changed, 17 insertions(+), 15 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index 90f2de0b07c..6eb3fe7fda5 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -235,6 +235,15 @@ foreach my $item (@items){ > $item_info->{'nomod'}=1; > } > } >+ >+ $item_info->{old_issues} = Koha::Old::Checkouts->search( >+ { itemnumber => $item->itemnumber }, >+ { >+ order_by => { '-desc' => 'returndate' }, >+ limit => 3 >+ } >+ ); >+ > push @item_data, $item_info; > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 765c87fef4b..5ba3e48b08c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -406,22 +406,15 @@ > <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.object.last_returned_by.borrowernumber | uri %]">[% ITEM_DAT.object.last_returned_by.cardnumber | html %]</a> > </li> > [% END %] >- [% IF ( ITEM_DAT.card0 ) %] >+ [% FOR i IN ITEM_DAT.old_issues %] >+ [% SET b = i.patron %] > <li> >- <span class="label">Last borrower:</span> >- <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 | uri %]">[% ITEM_DAT.card0 | html %]</a> >- </li> >- [% END %] >- [% IF ( ITEM_DAT.card1 ) %] >- <li> >- <span class="label">Previous borrower:</span> >- <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 | uri %]">[% ITEM_DAT.card1 | html %]</a> >- </li> >- [% END %] >- [% IF ( ITEM_DAT.card2 ) %] >- <li> >- <span class="label">Previous borrower:</span> >- <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 | uri %]">[% ITEM_DAT.card2 | html %]</a> >+ [% IF loop.first %] >+ <span class="label">Last borrower:</span> >+ [% ELSE %] >+ <span class="label">Previous borrower:</span> >+ [% END %] >+ <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% b.borrowernumber | uri %]">[% b.cardnumber | html %]</a> > </li> > [% END %] > [% IF ( ITEM_DAT.paidfor ) %] >-- >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 32272
:
144107
|
145107
|
145156
|
145255
|
145258