Bugzilla – Attachment 106558 Details for
Bug 23070
Use Koha::Hold in C4::Reserves::RevertWaitingStatus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23070: Increment all priorities in 1 query
Bug-23070-Increment-all-priorities-in-1-query.patch (text/plain), 1.12 KB, created by
Katrin Fischer
on 2020-07-05 16:28:47 UTC
(
hide
)
Description:
Bug 23070: Increment all priorities in 1 query
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-07-05 16:28:47 UTC
Size:
1.12 KB
patch
obsolete
>From 6c0b104282bfbde2099124d5df352ca61762c3ae Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 27 Jan 2020 14:55:54 +0100 >Subject: [PATCH] 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> >--- > C4/Reserves.pm | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 197e00181a..1b79f4ed80 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1999,10 +1999,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( >-- >2.11.0
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 23070
:
90400
|
97976
|
97977
|
99168
|
99169
|
99170
|
103907
|
103908
|
103909
|
103910
|
104253
|
104261
|
104262
|
104263
|
104264
|
106556
|
106557
| 106558 |
106559