Bugzilla – Attachment 33238 Details for
Bug 12630
Prioritizing "Hold starts on date" -holds causes all other holds to be prioritized as well!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12630 - Prioritizing "Hold starts on date" -holds causes all other holds to be prioritized as well!
Bug-12630---Prioritizing-Hold-starts-on-date--hold.patch (text/plain), 2.19 KB, created by
Jonathan Druart
on 2014-11-05 09:33:52 UTC
(
hide
)
Description:
Bug 12630 - Prioritizing "Hold starts on date" -holds causes all other holds to be prioritized as well!
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-11-05 09:33:52 UTC
Size:
2.19 KB
patch
obsolete
>From 668361fa8d1375cebfad87fefd2c9a0658e29277 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Wed, 23 Jul 2014 08:41:47 +0300 >Subject: [PATCH] Bug 12630 - Prioritizing "Hold starts on date" -holds causes > all other holds to be prioritized as well! > >------------------------- >-- REPLICATE LIKE THIS -- >------------------------- > >0. Enable AllowHoldDateInFuture-system preference! > >1. Select a biblio with some holds. >2. Place a hold with the "Hold starts on date"-attribute set to future. >3. More the specific hold up on the priority queue. >4. Add another normal hold, observe how it is prioritized with the "Hold starts on date"-hold, leaving old holds to the prioritization queue tail. > >Unfair eh? > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > C4/Reserves.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 7a075a4..a1cc1a7 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -166,7 +166,7 @@ sub AddReserve { > } > if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { > # Make room in reserves for this before those of a later reserve date >- $priority = _ShiftPriorityByDateAndPriority( $biblionumber, $resdate, $priority ); >+ $priority = _ShiftPriorityByDateAndPriority( $biblionumber, $priority ); > } > my $waitingdate; > >@@ -2034,12 +2034,12 @@ the sub accounts for that too. > =cut > > sub _ShiftPriorityByDateAndPriority { >- my ( $biblio, $resdate, $new_priority ) = @_; >+ my ( $biblio, $new_priority ) = @_; > > my $dbh = C4::Context->dbh; >- my $query = "SELECT priority FROM reserves WHERE biblionumber = ? AND ( reservedate > ? OR priority > ? ) ORDER BY priority ASC LIMIT 1"; >+ my $query = "SELECT priority FROM reserves WHERE biblionumber = ? AND priority > ? ORDER BY priority ASC LIMIT 1"; > my $sth = $dbh->prepare( $query ); >- $sth->execute( $biblio, $resdate, $new_priority ); >+ $sth->execute( $biblio, $new_priority ); > my $min_priority = $sth->fetchrow; > # if no such matches are found, $new_priority remains as original value > $new_priority = $min_priority if ( $min_priority ); >-- >2.1.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 12630
:
29962
|
31140
|
31141
|
33238
|
33239
|
33240
|
135939
|
135940
|
135941
|
135942