Bugzilla – Attachment 139550 Details for
Bug 24295
C4::Circulation::GetTransfers should be removed, use Koha::Item->get_transfer instead
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24295: Remove GetTransfers from request.pl
Bug-24295-Remove-GetTransfers-from-requestpl.patch (text/plain), 2.41 KB, created by
Joonas Kylmälä
on 2022-08-21 19:27:20 UTC
(
hide
)
Description:
Bug 24295: Remove GetTransfers from request.pl
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-08-21 19:27:20 UTC
Size:
2.41 KB
patch
obsolete
>From 82ec59b05ea13bb24fd2f897b7ba6b13c3411630 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 15 Mar 2021 16:15:22 +0000 >Subject: [PATCH] Bug 24295: Remove GetTransfers from request.pl >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch replaces the call to GetTransfers in reserve.pl with the >get_transfer method available from the Koha::Item object > >Test plan >1/ Place a reserve on an item at a different branch >2/ Trigger the transfer of the item >3/ Check the reserves page for the display of the current transfer > status >4/ Apply patch >5/ Repeat step 3 > >Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > reserve/request.pl | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index 8c64f43160..5fcb7ad0b2 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -37,7 +37,7 @@ use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority Togg > use C4::Items qw( get_hostitemnumbers_of ); > use C4::Koha qw( getitemtypeimagelocation ); > use C4::Serials qw( CountSubscriptionFromBiblionumber ); >-use C4::Circulation qw( GetTransfers _GetCircControlBranch GetBranchItemRule ); >+use C4::Circulation qw( _GetCircControlBranch GetBranchItemRule ); > use Koha::DateUtils qw( dt_from_string ); > use C4::Search qw( enabled_staff_search_views ); > >@@ -450,13 +450,11 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) > } > > # Check the transit status >- my ( $transfertwhen, $transfertfrom, $transfertto ) = >- GetTransfers($item_object->itemnumber); # FIXME replace with get_transfer >- >- if ( defined $transfertwhen && $transfertwhen ne '' ) { >- $item->{transfertwhen} = $transfertwhen; >- $item->{transfertfrom} = $transfertfrom; >- $item->{transfertto} = $transfertto; >+ my $transfer = $item_object->get_transfer; >+ if ( $transfer && $transfer->in_transit ) { >+ $item->{transfertwhen} = $transfer->datesent; >+ $item->{transfertfrom} = $transfer->frombranch; >+ $item->{transfertto} = $transfer->tobranch; > $item->{nocancel} = 1; > } > >-- >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 24295
:
118242
|
118243
|
118244
|
118245
|
118246
|
118247
|
118248
|
118249
|
118250
|
118287
|
118295
|
118296
|
118297
|
118298
|
118299
|
118300
|
118301
|
118302
|
118303
|
118304
|
118305
|
118306
|
118307
|
118308
|
118309
|
118310
|
119854
|
119855
|
119856
|
119857
|
119858
|
119859
|
119860
|
119861
|
119862
|
119863
|
119864
|
119866
|
119867
|
127465
|
127466
|
127467
|
127468
|
127469
|
127470
|
127471
|
127472
|
127473
|
127474
|
127475
|
127476
|
127477
|
130430
|
130431
|
130432
|
130433
|
130434
|
130435
|
130436
|
130437
|
130438
|
130439
|
130440
|
130441
|
130442
|
139546
|
139547
|
139548
|
139549
|
139550
|
139551
|
139552
|
139553
|
139554
|
139555
|
139556
|
139557
|
139558
|
139655
|
139656
|
139657
|
139658
|
139659
|
139660
|
139661
|
139662
|
139663
|
139664
|
139665
|
139666
|
139667