Bugzilla – Attachment 174433 Details for
Bug 38186
Cancelling a hold from the holds over tab shouldn't trigger "return to home" transfer on a lost item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38186: Don't initiate transfer when cancelling hold on lost item
Bug-38186-Dont-initiate-transfer-when-cancelling-h.patch (text/plain), 3.23 KB, created by
Brendan Lawlor
on 2024-11-12 17:42:05 UTC
(
hide
)
Description:
Bug 38186: Don't initiate transfer when cancelling hold on lost item
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-11-12 17:42:05 UTC
Size:
3.23 KB
patch
obsolete
>From 2feecd4beda488896a4cadc81a71d3f5eb5eaf75 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 16 Oct 2024 10:14:51 -0400 >Subject: [PATCH] Bug 38186: Don't initiate transfer when cancelling hold on > lost item > >To test: >0. In the Circulation Rules, set the default return policy to "item > returns home (default settings have this already) >1. Find an item belonging to a branch other than the logged-in branch >2. Place a hold on that biblio record for pickup at the logged-in branch >3. Check in the item to set the hold to waiting >4. Set the expiration date to a date in the past > To do this in KTD: > ktd --shell > koha-mysql kohadev > UPDATE reserves SET expirationdate = < yesterday's date >; >5. Set a lost status on the item >6. Go to Circulation > Holds awaiting pickup >--> The hold should appear on the "holds waiting past their expiration > date" tab >7. Click the "Cancel and return to <homebranch>" button next to the hold >8. Open the biblio record for the item >--> Note that the lost status is gone and the item shows as in-transit >9. Apply patch >10. Repeat steps 2-8 on the same item >--> This time, the item is still lost and is not in-transit > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > circ/waitingreserves.pl | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index 0ffebe1b24..9322a0f779 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -145,23 +145,24 @@ if ($item && $tab eq 'holdsover' && !@cancel_result) { > exit; > > sub cancel { >- my ($item, $borrowernumber, $fbr, $tbr, $skip_transfers ) = @_; >+ my ( $itemnumber, $borrowernumber, $fbr, $tbr, $skip_transfers ) = @_; > > my $transfer = $fbr ne $tbr; # XXX && !$nextreservinfo; >+ my $item = Koha::Items->find( $itemnumber ); > > return if $transfer && $skip_transfers; > >- my ( $messages, $nextreservinfo ) = ModReserveCancelAll( $item, $borrowernumber ); >+ my ( $messages, $nextreservinfo ) = ModReserveCancelAll( $itemnumber, $borrowernumber ); > > # if the document is not in his homebranch location and there is not reservation after, we transfer it >- if ($transfer && !$nextreservinfo) { >- ModItemTransfer( $item, $fbr, $tbr, 'CancelReserve' ); >+ if ( $transfer && !$nextreservinfo && !$item->itemlost ) { >+ ModItemTransfer( $itemnumber, $fbr, $tbr, 'CancelReserve' ); > } > # if we have a result > if ($nextreservinfo) { > my %res; > my $patron = Koha::Patrons->find( $nextreservinfo ); >- my $title = Koha::Items->find( $item )->biblio->title; >+ my $title = $item->biblio->title; > if ( $messages->{'transfert'} ) { > $res{messagetransfert} = $messages->{'transfert'}; > $res{branchcode} = $messages->{'transfert'}; >@@ -171,7 +172,7 @@ sub cancel { > $res{nextreservnumber} = $nextreservinfo; > $res{nextreservsurname} = $patron->surname; > $res{nextreservfirstname} = $patron->firstname; >- $res{nextreservitem} = $item; >+ $res{nextreservitem} = $itemnumber; > $res{nextreservtitle} = $title; > $res{waiting} = $messages->{'waiting'} ? 1 : 0; > >-- >2.39.5
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 38186
:
172821
|
174433
|
174537