Bugzilla – Attachment 166130 Details for
Bug 27753
Automate resolution of return claim when checking in an item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27753: (follow-up) Update logic in AddReturn
Bug-27753-follow-up-Update-logic-in-AddReturn.patch (text/plain), 2.36 KB, created by
Martin Renvoize (ashimema)
on 2024-05-03 14:16:37 UTC
(
hide
)
Description:
Bug 27753: (follow-up) Update logic in AddReturn
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-03 14:16:37 UTC
Size:
2.36 KB
patch
obsolete
>From f11da8e98a4fabdd80764e3c32326cb156ec5869 Mon Sep 17 00:00:00 2001 >From: Laura Escamilla <laura.escamilla@bywatersolutions.com> >Date: Tue, 30 Apr 2024 14:21:35 +0000 >Subject: [PATCH] Bug 27753: (follow-up) Update logic in AddReturn > >The new logic in AddReturn was flawed, we were missing return messages >due to moving the if statement too high and catching more code than >intended. > >Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 5f642c2f908..a83e59671c3 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2535,29 +2535,29 @@ sub AddReturn { > } > > if ( C4::Context->preference('ClaimReturnedLostValue') ) { >- my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); > >- if ($autoClaimReturnCheckin) { > my $claim = Koha::Checkouts::ReturnClaims->find( > { > itemnumber => $item->id, > resolution => undef, > } > ); >- > if ($claim) { >- my $patron_id = $patron->borrowernumber; >- my $resolution = $autoClaimReturnCheckin; >+ my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); >+ if ($autoClaimReturnCheckin) { > >- $claim->resolve( >- { >- resolution => $resolution, >- resolved_by => $patron_id, >- } >- ); >- $messages->{ClaimAutoResolved} = $claim; >- } else { >- $messages->{ReturnClaims} = $claim if $claim; >+ my $patron_id = $patron->borrowernumber; >+ my $resolution = $autoClaimReturnCheckin; >+ >+ $claim->resolve( >+ { >+ resolution => $resolution, >+ resolved_by => $patron_id, >+ } >+ ); >+ $messages->{ClaimAutoResolved} = $claim; >+ } else { >+ $messages->{ReturnClaims} = $claim; > } > } > } >-- >2.44.0
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 27753
:
162517
|
163058
|
163059
|
163060
|
163061
|
163084
|
163085
|
163090
|
163469
|
163470
|
163474
|
163475
|
163476
|
163477
|
163479
|
163480
|
165911
|
165912
|
165914
|
165915
|
165916
|
165917
|
165918
|
165919
|
165920
|
165952
|
165953
|
165958
|
165959
|
166128
|
166129
| 166130 |
166131
|
166132
|
166133
|
166134
|
166135
|
166136
|
166137