Bugzilla – Attachment 52157 Details for
Bug 16686
Fix "Item in transit from since" in Holds tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16686 - Fix "Item in transit from since" in Holds tab
Bug-16686---Fix-Item-in-transit-from-since-in-Hold.patch (text/plain), 2.75 KB, created by
Kyle M Hall (khall)
on 2016-06-07 15:50:54 UTC
(
hide
)
Description:
Bug 16686 - Fix "Item in transit from since" in Holds tab
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-06-07 15:50:54 UTC
Size:
2.75 KB
patch
obsolete
>From 167d76e1cb535434df9d5ca7ea22f44539114948 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 7 Jun 2016 15:50:04 +0000 >Subject: [PATCH] Bug 16686 - Fix "Item in transit from since" in Holds tab > >"From branch" and date do not show up in patron's "Holds" tab: "Item in >transit from since" > >OPAC log: opac-user.pl: No method frombranch! at >/usr/share/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >line 607 > >Test Plan: >1) Apply this patch >2) Create an in transit hold >3) Not the from library is displayed >--- > Koha/Item.pm | 44 ++++++++++++++++++++++ > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 2 +- > 2 files changed, 45 insertions(+), 1 deletion(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index d721537..b828817 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -26,6 +26,8 @@ use Koha::Database; > use Koha::Patrons; > use Koha::Libraries; > >+use C4::Circulation qw( GetTransfers ); >+ > use base qw(Koha::Object); > > =head1 NAME >@@ -107,6 +109,48 @@ sub last_returned_by { > } > } > >+=head3 is_in_transit >+ >+my $transfer_date = $item->is_in_transit(); >+ >+=cut >+ >+sub is_in_transit { >+ my ($self) = @_; >+ >+ my ($when) = GetTransfers( $self->id ); >+ >+ return $when; >+} >+ >+=head3 in_transit_to >+ >+my $library_id = $item->in_transit_to(); >+ >+=cut >+ >+sub in_transit_to { >+ my ($self) = @_; >+ >+ my ( undef, undef, $to ) = GetTransfers( $self->id ); >+ >+ return $to; >+} >+ >+=head3 in_transit_from >+ >+my $library_id = $item->in_transit_from(); >+ >+=cut >+ >+sub in_transit_from { >+ my ($self) = @_; >+ >+ my ( undef, $from ) = GetTransfers( $self->id ); >+ >+ return $from; >+} >+ > =head3 type > > =cut >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index f31f47e..69cefff 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -604,7 +604,7 @@ > [% END %] > [% ELSE %] > [% IF ( RESERVE.is_in_transit ) %] >- Item in transit from <b> [% RESERVE.frombranch %]</b> since >+ Item in transit from <b> [% Branches.GetName( RESERVE.item.in_transit_from ) %]</b> since > [% RESERVE.datesent | $KohaDates %] > [% ELSIF ( RESERVE.suspend ) %] > Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %] >-- >2.1.4
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 16686
:
52157
|
52163
|
52164
|
52183
|
52898
|
53050
|
53053
|
53084
|
53190
|
53191
|
53192
|
53227
|
54128
|
54129
|
54130
|
54131
|
54392
|
54393
|
54394
|
54395