Bugzilla – Attachment 163090 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: Adding patch for AutoClaimReturnStatusOnCheckout syspref
Bug-27753-Adding-patch-for-AutoClaimReturnStatusOn.patch (text/plain), 1.54 KB, created by
ByWater Sandboxes
on 2024-03-12 12:41:05 UTC
(
hide
)
Description:
Bug 27753: Adding patch for AutoClaimReturnStatusOnCheckout syspref
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-03-12 12:41:05 UTC
Size:
1.54 KB
patch
obsolete
>From a86bec58e94e1eb83f790d996b318ef7a106a11d Mon Sep 17 00:00:00 2001 >From: Laura Escamilla <laura.escamilla@bywatersolutions.com> >Date: Tue, 12 Mar 2024 04:16:38 +0000 >Subject: [PATCH] Bug 27753: Adding patch for AutoClaimReturnStatusOnCheckout > syspref > >Signed-off-by: Michelle <mspinney@clamsnet.org> >--- > C4/Circulation.pm | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 109809d4b9..6e79039546 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2547,6 +2547,8 @@ sub AddReturn { > } > > if ( C4::Context->preference('ClaimReturnedLostValue') ) { >+ my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); >+ > my $claims = Koha::Checkouts::ReturnClaims->search( > { > itemnumber => $item->id, >@@ -2555,9 +2557,24 @@ sub AddReturn { > ); > > if ( $claims->count ) { >+ if ($autoClaimReturnCheckin) { >+ my $claim = $claims->next; >+ >+ my $patron_id = $patron->borrowernumber; >+ my $resolution = $autoClaimReturnCheckin; >+ >+ $claim->resolve( >+ { >+ resolution => $resolution, >+ resolved_by => $patron_id, >+ } >+ ); >+ $messages->{ClaimAutoResolved} = $claim; >+ } else { > $messages->{ReturnClaims} = $claims; > } > } >+} > > # Check for bundle status > if ( $item->in_bundle ) { >-- >2.30.2
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