Bugzilla – Attachment 62320 Details for
Bug 18001
LocalHoldsPriority can cause multiple holds queue lines for same hold request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18001 - LocalHoldsPriority can cause multiple holds queue lines for same hold request
Bug-18001---LocalHoldsPriority-can-cause-multiple-.patch (text/plain), 2.68 KB, created by
Jonathan Druart
on 2017-04-18 18:41:03 UTC
(
hide
)
Description:
Bug 18001 - LocalHoldsPriority can cause multiple holds queue lines for same hold request
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-18 18:41:03 UTC
Size:
2.68 KB
patch
obsolete
>From 04029e866eb571974128122e9926f750cc9c72d8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 26 Jan 2017 14:31:35 +0000 >Subject: [PATCH] Bug 18001 - LocalHoldsPriority can cause multiple holds queue > lines for same hold request > >If LocalHoldsPriority is enabled, and a record level request has more >than one item that could fill that hold, there is a possibility that a >holds queue row will be generated for the request for each of the >available items! > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/HoldsQueue.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index e5f29c7..0f2ad22 100755 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -397,6 +397,7 @@ sub MapItemsToHoldRequests { > C4::Context->preference('LocalHoldsPriorityItemControl'); > > foreach my $request (@$hold_requests) { >+ next if (defined($request->{itemnumber})); #skip item level holds in local priority checking > last if $num_items_remaining == 0; > > my $local_hold_match; >@@ -422,7 +423,8 @@ sub MapItemsToHoldRequests { > > if ($local_hold_match) { > if ( exists $items_by_itemnumber{ $item->{itemnumber} } >- and not exists $allocated_items{ $item->{itemnumber} } ) >+ and not exists $allocated_items{ $item->{itemnumber} } >+ and not $request->{allocated}) > { > $item_map{ $item->{itemnumber} } = { > borrowernumber => $request->{borrowernumber}, >@@ -435,6 +437,7 @@ sub MapItemsToHoldRequests { > reservenotes => $request->{reservenotes}, > }; > $allocated_items{ $item->{itemnumber} }++; >+ $request->{allocated} = 1; > $num_items_remaining--; > } > } >@@ -444,6 +447,7 @@ sub MapItemsToHoldRequests { > > foreach my $request (@$hold_requests) { > last if $num_items_remaining == 0; >+ next if $request->{allocated}; > > # is this an item-level request? > if (defined($request->{itemnumber})) { >@@ -494,6 +498,7 @@ sub MapItemsToHoldRequests { > my $pull_branches; > foreach my $request (@$hold_requests) { > last if $num_items_remaining == 0; >+ next if $request->{allocated}; > next if defined($request->{itemnumber}); # already handled these > > # look for local match first >-- >2.9.3
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 18001
:
59588
|
59990
|
62268
|
62269
|
62318
| 62320