Bugzilla – Attachment 175438 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.60 KB, created by
Marcel de Rooy
on 2024-12-13 08:48:40 UTC
(
hide
)
Description:
Bug 38531: add diff when reverting hold
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-12-13 08:48:40 UTC
Size:
1.60 KB
patch
obsolete
>From 46dc55aa4d58c1cfc7d367d7c4e0379a50a774d6 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 >Content-Type: text/plain; charset=utf-8 > >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 > >Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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