Bug 23070: Pass no_triggers => 1 to Koha::Objects->update
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 29 Apr 2020 10:19:46 +0000 (12:19 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 20 Jul 2020 14:16:37 +0000 (16:16 +0200)
To make sure we will update all the objects in one go (and no trigger
the ->set->store from Koha::Object->update)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

C4/Reserves.pm

index 2a5904f..bf14584 100644 (file)
@@ -2007,7 +2007,7 @@ sub RevertWaitingStatus {
     ## Increment the priority of all other non-waiting
     ## reserves for this bib record
     my $holds = Koha::Holds->search({ biblionumber => $hold->biblionumber, priority => { '>' => 0 } })
-                           ->update({ priority => \'priority + 1' });
+                           ->update({ priority => \'priority + 1' }, { no_triggers => 1 });
 
     ## Fix up the currently waiting reserve
     $hold->set(