Bugzilla – Attachment 54129 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: Rename the transfer method to get_transfer
Bug-16686-Rename-the-transfer-method-to-gettransfe.patch (text/plain), 2.59 KB, created by
Marc Véron
on 2016-08-07 19:56:18 UTC
(
hide
)
Description:
Bug 16686: Rename the transfer method to get_transfer
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-08-07 19:56:18 UTC
Size:
2.59 KB
patch
obsolete
>From 964caa106872ce1938a0252cdce3ce18b679de20 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Jul 2016 18:04:27 +0100 >Subject: [PATCH] Bug 16686: Rename the transfer method to get_transfer > >Signed-off-by: Marc <veron@veron.ch> >--- > Koha/Item.pm | 15 +++++++++++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++-- > 2 files changed, 15 insertions(+), 4 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 55bf14e..0bbc493 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -23,6 +23,7 @@ use Carp; > > use Koha::Database; > >+use Koha::Item::Transfer; > use Koha::Patrons; > use Koha::Libraries; > >@@ -74,9 +75,19 @@ sub holding_branch { > return $self->{_holding_branch}; > } > >-sub transfer { >+=head3 get_transfer >+ >+my $transfer = $item->get_transfer; >+ >+Return the transfer if the item is in transit or undef >+ >+=cut >+ >+sub get_transfer { > my ( $self ) = @_; >- return $self->_result->branchtransfers->first; >+ my $transfer_rs = $self->_result->branchtransfers->search({ datearrived => undef })->first; >+ return unless $transfer_rs; >+ return Koha::Item::Transfer->_new_from_dbic( $transfer_rs ); > } > > =head3 last_returned_by >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 8f63ad1..74b16be 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -623,8 +623,8 @@ Using this account is not recommended because some parts of Koha will not functi > [% END %] > [% ELSE %] > [% IF ( RESERVE.is_in_transit ) %] >- [% SET transfer = RESERVE.item.transfer %] >- Item in transit from <b> [% transfer.frombranch.branchname %]</b> since >+ [% SET transfer = RESERVE.item.get_transfer %] >+ Item in transit from <b> [% Branches.GetName( transfer.frombranch ) %]</b> since > [% transfer.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