Bugzilla – Attachment 179295 Details for
Bug 31698
Add ability to move a hold to a new bibliographic record/item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31698: Flip the logic for priority
Bug-31698-Flip-the-logic-for-priority.patch (text/plain), 1.47 KB, created by
Lucas Gass (lukeg)
on 2025-03-13 23:55:28 UTC
(
hide
)
Description:
Bug 31698: Flip the logic for priority
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-03-13 23:55:28 UTC
Size:
1.47 KB
patch
obsolete
>From eb075145c6d3b7148c9ff04f02056658167e22f7 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 13 Mar 2025 23:55:10 +0000 >Subject: [PATCH] Bug 31698: Flip the logic for priority > >--- > Koha/Hold.pm | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 54056435ac3..36336dad812 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -203,20 +203,19 @@ sub move_hold_item { > > if ( $canReserve->{status} eq 'OK' ) { > >- # Find the highest priority among holds on the new item >+ # Find the lowest priority among holds on the new item > my $highest_new_priority = Koha::Holds->search( > { biblionumber => $new_biblionumber }, > { order_by => { -desc => 'priority' }, rows => 1 } > )->next; >- >- my $max_new_priority = $highest_new_priority ? $highest_new_priority->priority : 0; >- my $new_priority = $max_new_priority + 1; >+ my $next_available_priority = >+ $highest_new_priority ? $highest_new_priority->priority + 1 : 1; # Always start at 1 if empty > > $self->update( > { > itemnumber => $new_item->itemnumber, > biblionumber => $new_item->biblionumber, >- priority => $new_priority, >+ priority => $next_available_priority, > } > ); > >-- >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 31698
:
179226
|
179235
|
179236
|
179279
|
179287
|
179290
|
179291
|
179292
|
179295
|
179704
|
179711
|
179713
|
181222
|
181223
|
181224
|
181225
|
181226
|
181228
|
181229
|
181230
|
181231
|
181232
|
181233
|
181234
|
181929
|
181930
|
181944
|
181945
|
181946
|
181947
|
181948
|
181951
|
181952
|
181953
|
181954
|
181955
|
181956
|
181957
|
181958
|
181959
|
181960
|
181961
|
181962
|
182639
|
182640
|
182641