Bug 24733 - Cannot search for duplicate orders using 'Basket created by' field
Summary: Cannot search for duplicate orders using 'Basket created by' field
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on: 15184
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-26 03:16 UTC by Nick Clemens (kidclamp)
Modified: 2020-11-30 21:47 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05, 19.05.10, 18.11.16
Circulation function:


Attachments
Bug 24733: created_by param should be an arrayref (1.51 KB, patch)
2020-02-26 03:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 24733: created_by param should be an arrayref (1.59 KB, patch)
2020-02-26 08:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2020-02-26 03:16:19 UTC
To recreate:
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.)
Comment 1 Nick Clemens (kidclamp) 2020-02-26 03:19:44 UTC
Created attachment 99628 [details] [review]
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
Comment 2 Jonathan Druart 2020-02-26 08:38:53 UTC
Created attachment 99630 [details] [review]
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>
Comment 3 Jonathan Druart 2020-02-26 08:39:28 UTC
Oops, sorry about that!

Trivial, marking as PQA.
Comment 4 Martin Renvoize (ashimema) 2020-02-26 20:43:30 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-04-01 20:14:59 UTC
backported to 19.11.x for 19.11.05
Comment 6 Lucas Gass (lukeg) 2020-04-08 21:38:24 UTC
backported to 19.05.x for 19.05.10
Comment 7 Hayley Pelham 2020-04-14 04:29:40 UTC
Backported to 18.11.x for 18.11.16