Bug 23070: Increment all priorities in 1 query
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>
This commit is contained in:
parent
c77f4496b2
commit
6f6f88105d
1 changed files with 2 additions and 4 deletions
|
@ -2006,10 +2006,8 @@ 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 } });
|
||||
while ( my $h = $holds->next ) {
|
||||
$h->priority( $h->priority + 1 )->store;
|
||||
}
|
||||
my $holds = Koha::Holds->search({ biblionumber => $hold->biblionumber, priority => { '>' => 0 } })
|
||||
->update({ priority => \'priority + 1' });
|
||||
|
||||
## Fix up the currently waiting reserve
|
||||
$hold->set(
|
||||
|
|
Loading…
Reference in a new issue