Bugzilla – Attachment 114824 Details for
Bug 26367
Warn in HoldsQueue if request itemtype set but request is not item specific
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26367: Prevent warn about undefined values when record level hold has an itemtype
Bug-26367-Prevent-warn-about-undefined-values-when.patch (text/plain), 1.95 KB, created by
Katrin Fischer
on 2021-01-04 22:30:20 UTC
(
hide
)
Description:
Bug 26367: Prevent warn about undefined values when record level hold has an itemtype
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-01-04 22:30:20 UTC
Size:
1.95 KB
patch
obsolete
>From 00221758eb0fe4f9080236f5f4ea5c18b4ed689a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 3 Sep 2020 12:15:57 +0000 >Subject: [PATCH] Bug 26367: Prevent warn about undefined values when record > level hold has an itemtype > >To test: > 1 - set AllowHoldItemTypeSelection to 'Allow' > 2 - Find a patron from Library A > 3 - Find a record with an item from Library A > 4 - Place a title level hold with itemtype specified for a delivery at Library A for patron and record above > 5 - perl misc/cronjobs/holds/build_holds_queue.pl > 6 - There are warns: > Use of uninitialized value in hash element at /kohadevbox/koha/C4/HoldsQueue.pm line 523. > Use of uninitialized value in string eq at /kohadevbox/koha/C4/HoldsQueue.pm line 523 > 7 - Apply this patch > 8 - perl misc/cronjobs/holds/build_holds_queue.pl > 9 - No more warns! >10 - prove -v t/db_dependent/HoldsQueue.t >11 - All tests pass! > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/HoldsQueue.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 14b5dc15ce..87144193ff 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -530,7 +530,7 @@ sub MapItemsToHoldRequests { > && ( ( $item->{hold_fulfillment_policy} eq 'any' ) # Don't fill item level holds that contravene the hold pickup policy at this time > || $request->{branchcode} eq $item->{ $item->{hold_fulfillment_policy} } ) > && ( !$request->{itemtype} # If hold itemtype is set, item's itemtype must match >- || $items_by_itemnumber{ $request->{itemnumber} }->{itype} eq $request->{itemtype} ) >+ || ( $request->{itemnumber} && ( $items_by_itemnumber{ $request->{itemnumber} }->{itype} eq $request->{itemtype} ) ) ) > ) > { > $itemnumber = $item->{itemnumber}; >-- >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 26367
:
109620
|
109621
|
113031
|
113032
|
114823
| 114824