Bugzilla – Attachment 99630 Details for
Bug 24733
Cannot search for duplicate orders using 'Basket created by' field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24733: created_by param should be an arrayref
Bug-24733-createdby-param-should-be-an-arrayref.patch (text/plain), 1.59 KB, created by
Jonathan Druart
on 2020-02-26 08:38:53 UTC
(
hide
)
Description:
Bug 24733: created_by param should be an arrayref
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-26 08:38:53 UTC
Size:
1.59 KB
patch
obsolete
>From 083f8c927778adb9d48c4fe77bda923f3d2748e3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 26 Feb 2020 03:16:26 +0000 >Subject: [PATCH] Bug 24733: created_by param should be an arrayref > >We allow for the user to add multiple users to this field, and the >search function expects and array. We have been treating it as a scalar > >TO test: >1 - Have an open basket in acquisitions >2 - Add to basket - from an existing order (copy) >3 - Enter a name in the 'Basket created by' field and select a user >4 - Hit search >5 - ISE (Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/koha/lib/C4/Acquisition.pm line 2482.) >6 - Apply patch >7 - Repeat 1-4 >8 - Success! >9 - Test with mutiple 'created by' entries as well > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > acqui/duplicate_orders.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/acqui/duplicate_orders.pl b/acqui/duplicate_orders.pl >index b840db13be..eb975da035 100755 >--- a/acqui/duplicate_orders.pl >+++ b/acqui/duplicate_orders.pl >@@ -65,8 +65,9 @@ my $filters = { > orderstatus => scalar $input->param('orderstatus'), > ordernumber => scalar $input->param('ordernumber'), > search_children_too => scalar $input->param('search_children_too'), >- created_by => scalar $input->multi_param('created_by'), >+ created_by => [$input->multi_param('created_by')] > }; >+ > my $from_placed_on = > eval { dt_from_string( scalar $input->param('from') ) } || dt_from_string; > my $to_placed_on = >-- >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 24733
:
99628
| 99630