Bugzilla – Attachment 174983 Details for
Bug 38531
Include action_logs.diff when reverting hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38531: add diff when reverting hold
Bug-38531-add-diff-when-reverting-hold.patch (text/plain), 1.44 KB, created by
Andrew Fuerste-Henry
on 2024-11-25 20:33:59 UTC
(
hide
)
Description:
Bug 38531: add diff when reverting hold
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2024-11-25 20:33:59 UTC
Size:
1.44 KB
patch
obsolete
>From 7c1605d9274b0fdb7ecddf07ab22711dad4694ea Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Mon, 25 Nov 2024 20:31:30 +0000 >Subject: [PATCH] Bug 38531: add diff when reverting hold > >To test: >1 - place, capture, and revert a hold >2 - view action logs for your hold via SQL so you can see the diff column >3 - confirm reversion of waiting hold generates a MODIFY line in logs with no diff >4 - apply patch, restart_all >5 - capture and revert your hold again >6 - confirm logs include diff showing change to found and priority >--- > C4/Reserves.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 046bfd0235..a4cfc7cb50 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -2067,6 +2067,8 @@ sub RevertWaitingStatus { > } > )->next; > >+ my $original = C4::Context->preference('HoldsLog') ? $hold->unblessed : undef; >+ > ## Increment the priority of all other non-waiting > ## reserves for this bib record > my $holds = Koha::Holds->search({ biblionumber => $hold->biblionumber, priority => { '>' => 0 } }) >@@ -2083,7 +2085,7 @@ sub RevertWaitingStatus { > } > )->store( { hold_reverted => 1 } ); > >- logaction( 'HOLDS', 'MODIFY', $hold->id, $hold ) >+ logaction( 'HOLDS', 'MODIFY', $hold->id, $hold, undef, $original ) > if C4::Context->preference('HoldsLog'); > > _FixPriority( { biblionumber => $hold->biblionumber } ); >-- >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 38531
:
174983
|
174984
|
175438