Bugzilla – Attachment 118248 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 svc/holds
Bug-24295-Remove-GetTransfers-from-svcholds.patch (text/plain), 1.70 KB, created by
Martin Renvoize (ashimema)
on 2021-03-15 16:26:35 UTC
(
hide
)
Description:
Bug 24295: Remove GetTransfers from svc/holds
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-15 16:26:35 UTC
Size:
1.70 KB
patch
obsolete
>From 9dc85c8d7d447834c85b885a8644d4b69c2656d0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 15 Mar 2021 16:24:03 +0000 >Subject: [PATCH] Bug 24295: Remove GetTransfers from svc/holds > >This patch replaces the call to C4::GetTransfers in svc/holds with a >call to the get_transfer method in the Koha::Item object. >--- > svc/holds | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/svc/holds b/svc/holds >index 5e0a9d91fb..99def77f87 100755 >--- a/svc/holds >+++ b/svc/holds >@@ -24,7 +24,6 @@ use JSON qw(to_json); > > use C4::Auth qw(check_cookie_auth); > use C4::Charset; >-use C4::Circulation qw(GetTransfers); > use C4::Context; > > use Koha::DateUtils; >@@ -138,13 +137,12 @@ while ( my $h = $holds_rs->next() ) { > $hold->{enumchron} = $item->enumchron(); > $hold->{itemcallnumber} = $item->itemcallnumber() || q{}; > >- my ( $transferred_when, $transferred_from, $transferred_to ) = >- GetTransfers( $item->itemnumber() ); >- if ($transferred_when) { >+ my $transfer = $item->get_transfer; >+ if ( $transfer->in_transit ) { > $hold->{color} = 'transferred'; > $hold->{transferred} = 1; >- $hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); >- $hold->{from_branch} = Koha::Libraries->find($transferred_from)->branchname; >+ $hold->{date_sent} = output_pref({ dt => dt_from_string($transfer->datesent) }); >+ $hold->{from_branch} = Koha::Libraries->find($transfer->frombranch)->branchname; > } > elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne > $h->branch()->branchcode() ) >-- >2.20.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 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