Bugzilla – Attachment 139762 Details for
Bug 31313
Remove GetItemsInfo from opac-detail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31313: (QA follow-up) Show transfer status correctly if item in transit
Bug-31313-QA-follow-up-Show-transfer-status-correc.patch (text/plain), 3.62 KB, created by
Nick Clemens (kidclamp)
on 2022-08-25 10:07:06 UTC
(
hide
)
Description:
Bug 31313: (QA follow-up) Show transfer status correctly if item in transit
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-08-25 10:07:06 UTC
Size:
3.62 KB
patch
obsolete
>From 8627016af9d859d2771bffe296771828f2d162b2 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Tue, 23 Aug 2022 19:51:32 +0000 >Subject: [PATCH] Bug 31313: (QA follow-up) Show transfer status correctly if > item in transit >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The patch "Bug 31313: Fix availability - OPAC >opac-detail" (70cb4e22c07) caused the OPAC detail page only show >"Available" status even when the item was in transit. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../bootstrap/en/includes/item-status.inc | 18 +++++++++++++++--- > opac/opac-detail.pl | 9 --------- > 2 files changed, 15 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >index 31bd552e54..4c179ca0dd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >@@ -43,10 +43,22 @@ > [% IF !item.isa('Koha::Item') AND item.avail_for_recall %]<a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% item.biblionumber | uri %]" class="btn btn-default btn-xs">Recall</a>[% END %] > [% END %] > >-[% IF NOT ( item.isa('Koha::Item') ) AND item.transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %] >+[% IF item.isa('Koha::Item') %] >+ [% SET transfer = item.get_transfer %] >+ [% IF transfer AND transfer.in_transit %] >+ [% SET transfertwhen = transfer.datesent %] >+ [% SET transfertfrom = transfer.frombranch %] >+ [% SET transfertto = transfer.tobranch %] >+ [% END %] >+[% ELSE %] >+ [% SET transfertwhen = item.transfertwhen %] >+ [% SET transfertfrom = item.transfertfrom %] >+ [% SET transfertto = item.transfertto %] >+[% END %] >+[% IF transfertwhen %] [%# transfertwhen is set in C4::Search, do not have it for course reserves %] > [% SET itemavailable = 0 %] >- <span class="item-status intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] >- to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span> >+ <span class="item-status intransit">In transit from [% Branches.GetName( transfertfrom ) | html %] >+ to [% Branches.GetName( transfertto ) | html %] since [% transfertwhen | $KohaDates %]</span> > [% END %] > > [% IF (item.isa('Koha::Item') AND item.holds.waiting.count) OR (NOT item.isa('Koha::Item') AND item.waiting) %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 2f8a027078..ed224e08fb 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -45,7 +45,6 @@ use C4::Biblio qw( > GetMarcSubjects > GetMarcUrls > ); >-use C4::Circulation qw( GetTransfers ); > use C4::Tags qw( get_tags ); > use C4::XISBN qw( get_xisbns ); > use C4::External::Amazon qw( get_amazon_tld ); >@@ -729,14 +728,6 @@ else { > $item_info->{checkout} = $item->checkout; > $item_info->{object} = $item; > >- my ( $transfertwhen, $transfertfrom, $transfertto ) = >- GetTransfers( $item->itemnumber ); >- if ( defined($transfertwhen) && $transfertwhen ne '' ) { >- $item_info->{transfertwhen} = $transfertwhen; >- $item_info->{transfertfrom} = $transfertfrom; >- $item_info->{transfertto} = $transfertto; >- } >- > if ( C4::Context->preference('OPACAcquisitionDetails') ) { > $item_info->{on_order} = 1 > if grep { $_ eq $item->itemnumber } @itemnumbers_on_order; >-- >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 31313
:
138821
|
138822
|
138847
|
138848
|
139119
|
139120
|
139121
|
139122
|
139193
|
139239
|
139693
|
139694
|
139695
|
139761
| 139762 |
139763