Bugzilla – Attachment 133301 Details for
Bug 30541
Resolve return claim works but "hangs" if MarkLostItemsAsReturned is set for return claims
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30541 - Resolve return claim works but "hangs" if MarkLostItemsAsReturned is set for return claims
Bug-30541---Resolve-return-claim-works-but-hangs-i.patch (text/plain), 1.69 KB, created by
Kyle M Hall (khall)
on 2022-04-14 11:02:35 UTC
(
hide
)
Description:
Bug 30541 - Resolve return claim works but "hangs" if MarkLostItemsAsReturned is set for return claims
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-04-14 11:02:35 UTC
Size:
1.69 KB
patch
obsolete
>From 0a45b115124b4eca1d3f37cd4a8193a3623e9eaf Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 14 Apr 2022 06:50:20 -0400 >Subject: [PATCH] Bug 30541 - Resolve return claim works but "hangs" if > MarkLostItemsAsReturned is set for return claims > >Basically, if MarkLostItemsAsReturned is set for return claims, the code will crash while trying to pull the checkout so it can update the lost status of the item. This is because the code assumes there must be a checkout and never checks the old_checkouts table. > >This bug appears to only exist in 21.05 at this time. It was fixed by a combination of bugs 29495 and 28588. > >Test Plan: >1) Set MarkLostItemsAsReturned for return claims >2) Mark a checkout as claims returned >3) Verify the checkout is no longer on the patron record >4) Resolve the claim >5) Note the attempt "hangs" but refreshing the page shows it worked >6) Apply this patch, restart all the things! >7) Repeat steps 2-4 >8) It works! >--- > Koha/Checkouts/ReturnClaim.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/Checkouts/ReturnClaim.pm b/Koha/Checkouts/ReturnClaim.pm >index c95c099a44..3f20e0c236 100644 >--- a/Koha/Checkouts/ReturnClaim.pm >+++ b/Koha/Checkouts/ReturnClaim.pm >@@ -73,8 +73,12 @@ sub checkout { > my ($self) = @_; > > my $checkout_rs = $self->_result->checkout; >- return unless $checkout_rs; >- return Koha::Checkout->_new_from_dbic($checkout_rs); >+ return Koha::Checkout->_new_from_dbic($checkout_rs) >+ if $checkout_rs; >+ >+ $checkout_rs = $self->_result->old_checkout; >+ return Koha::Old::Checkout->_new_from_dbic($checkout_rs) >+ if $checkout_rs; > } > > =head3 old_checkout >-- >2.32.0 (Apple Git-132)
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 30541
:
133300
|
133301
|
133357
|
133377
|
133387