Bugzilla – Attachment 118299 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 27896: Remove DeleteTransfer from circ/return.pl
Bug-27896-Remove-DeleteTransfer-from-circreturnpl.patch (text/plain), 1.45 KB, created by
Martin Renvoize (ashimema)
on 2021-03-16 11:01:26 UTC
(
hide
)
Description:
Bug 27896: Remove DeleteTransfer from circ/return.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-16 11:01:26 UTC
Size:
1.45 KB
patch
obsolete
>From de67dee7a44936aa1ad3d072c2608925735d1f4d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 8 Mar 2021 15:24:14 +0000 >Subject: [PATCH] Bug 27896: Remove DeleteTransfer from circ/return.pl > >This patch replaces the DeleteTransfer call in circ/returns.pl with a >call to Koha::Item::Transfer->cancel. > >Test plan >1/ Check an item out >2/ Add a transfer request for the item to a second library >3/ Attempt to check the item in at the first library >4/ Note that you should be given a 'WrongTransfer' modal and have to >option to cancel. >5/ Cancel the transfer >6/ Check in the database that the transfer now has 'datecancelled' set. >7/ Add a transfer for the item again >8/ From the transferstoreceive page cancel the transfer >9/ Click cancel and again check that datecancelled is set in the >database for your transfer > >https://bugs.koha-community.org/show_bug.cgi?id=24295 >--- > circ/returns.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index b58e340f85..48ff94c2a4 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -228,7 +228,9 @@ if ($dotransfer){ > } > > if ($canceltransfer){ >- DeleteTransfer($itemnumber); >+ my $item = Koha::Item->find($itemnumber); >+ my $transfer = $item->get_transfer; >+ $transfer->cancel({ reason => 'Manual', force => 1}); > if($dest eq "ttr"){ > print $query->redirect("/cgi-bin/koha/circ/transferstoreceive.pl"); > exit; >-- >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