Bugzilla – Attachment 145107 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
0001-Bug-32272-Restore-last-and-previous-borrowers-on-mor.patch (text/plain), 4.15 KB, created by
Michael Hafen
on 2023-01-06 21:28:35 UTC
(
hide
)
Description:
Bug 32272: Restore last and previous borrowers on moredetail
Filename:
MIME Type:
Creator:
Michael Hafen
Created:
2023-01-06 21:28:35 UTC
Size:
4.15 KB
patch
obsolete
>From 07b898fc607709e40ec210e52768c1640ddfa3e7 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 >Content-Type: text/plain; charset="utf-8" > >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 >--- > 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 90f2de0b07..6eb3fe7fda 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 765c87fef4..5ba3e48b08 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.34.1 >
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