Bugzilla – Attachment 193374 Details for
Bug 41883
Modifications using batch hold modification tool aren't logged
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41883: logaction when batch modifying holds
Bug-41883-logaction-when-batch-modifying-holds.patch (text/plain), 1.96 KB, created by
OpenFifth Sandboxes
on 2026-02-19 10:06:13 UTC
(
hide
)
Description:
Bug 41883: logaction when batch modifying holds
Filename:
MIME Type:
Creator:
OpenFifth Sandboxes
Created:
2026-02-19 10:06:13 UTC
Size:
1.96 KB
patch
obsolete
>From 8721722b401aceb0caf21204e59a069b5ca514f5 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 18 Feb 2026 22:15:32 +0000 >Subject: [PATCH] Bug 41883: logaction when batch modifying holds >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >-APPLY PATCH and restart_all >-Place a hold >-Run the Holds log using the hold's reserve_id. There will be a single entry for the hold's creation. >-Find the hold using the batch hold modification tool, and update its pickup location >-Look at the action log, the chnage should be logged >-Try batch modding holds in other ways, ensure the changes are logged >-Turn off HoldsLog and batch modify some holds, the changes should NOT be logged. > >Signed-off-by: Anneli Ãsterman <anneli.osterman@koha-suomi.fi> >--- > tools/batch_modify_holds.pl | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/tools/batch_modify_holds.pl b/tools/batch_modify_holds.pl >index 4ba25f9cf4..eddfbcb02d 100755 >--- a/tools/batch_modify_holds.pl >+++ b/tools/batch_modify_holds.pl >@@ -25,6 +25,7 @@ use JSON qw( to_json ); > > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); >+use C4::Log qw( logaction ); > > use Koha::DateUtils qw( dt_from_string ); > use Koha::Holds; >@@ -65,6 +66,7 @@ if ( $op eq 'cud-form' ) { > Koha::Holds->search( { reserve_id => { -in => \@hold_ids } }, { join => [ "item", "biblio" ] } ); > > while ( my $hold = $holds_to_update->next ) { >+ my $hold_before_mod = $hold->unblessed; > > if ($new_expiration_date) { > $hold->expirationdate($new_expiration_date)->store; >@@ -98,6 +100,10 @@ if ( $op eq 'cud-form' ) { > if ($clear_hold_notes) { > $hold->reservenotes(undef)->store; > } >+ >+ logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold, undef, $hold_before_mod ) >+ if C4::Context->preference('HoldsLog'); >+ > push @holds_data, $hold; > } > >-- >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 41883
:
193368
| 193374