Bug 11551 - Allow to search on ordernumber in histsearch.pl
Summary: Allow to search on ordernumber in histsearch.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-14 12:59 UTC by Jonathan Druart
Modified: 2015-06-04 23:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11507: Allow to search on parent ordernumber in histsearch.pl (4.69 KB, patch)
2014-01-14 13:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11551: Add unit tests for GetHistory (1.58 KB, patch)
2014-01-14 13:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11551: Allow to search on parent ordernumber in histsearch.pl (4.64 KB, patch)
2014-01-14 13:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11551: Add unit tests for GetHistory (1.40 KB, patch)
2014-03-12 09:11 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 11551: Allow to search on parent ordernumber in histsearch.pl (4.69 KB, patch)
2014-03-12 09:11 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 11551: Add unit tests for GetHistory (1.54 KB, patch)
2014-03-13 10:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11551: Allow to search on parent ordernumber in histsearch.pl (4.64 KB, patch)
2014-03-13 10:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 11551: Add unit tests for GetHistory (1.66 KB, patch)
2014-03-13 13:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11551: Allow to search on parent ordernumber in histsearch.pl (4.81 KB, patch)
2014-03-13 13:59 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-01-14 12:59:01 UTC
The orders search does not allow to search on the ordernumber.
On the way, the parent ordernumber could be requested too in order to display the 'children' for a given order.
Comment 1 Jonathan Druart 2014-01-14 13:01:57 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-01-14 13:02:05 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-01-14 13:03:05 UTC Comment hidden (obsolete)
Comment 4 AlexHorsman 2014-01-16 20:16:58 UTC
trying to test this:
prove t/db_dependent/Acquisition.t

but getting this error:

t/db_dependent/Acquisition.t .. 1/66 Use of uninitialized value $orderstatus in string ne at /usr/share/koha/lib/C4/Acquisition.pm line 2242.

#   Failed test 'GetHistory with a given ordernumber returns 1 order'
#   at t/db_dependent/Acquisition.t line 184.
#          got: '4'
#     expected: '1'
Use of uninitialized value $orderstatus in string ne at /usr/share/koha/lib/C4/Acquisition.pm line 2242.

#   Failed test 'GetHistory with a given ordernumber and search_children_too set returns 2 orders'
#   at t/db_dependent/Acquisition.t line 186.
#          got: '4'
#     expected: '2'
# Looks like you failed 2 tests of 66.
t/db_dependent/Acquisition.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/66 subtests 

Test Summary Report
-------------------
t/db_dependent/Acquisition.t (Wstat: 512 Tests: 66 Failed: 2)
  Failed tests:  56-57
  Non-zero exit status: 2
Files=1, Tests=66,  1 wallclock secs ( 0.06 usr  0.00 sys +  0.94 cusr  0.07 csys =  1.07 CPU)
Result: FAIL
Comment 5 Jonathan Druart 2014-01-17 08:18:51 UTC
(In reply to AlexHorsman from comment #4)
> trying to test this:
> prove t/db_dependent/Acquisition.t
> 
> but getting this error:

Did you apply the 2 patches against master?
The tests pass for me.
Comment 6 Biblibre Sandboxes 2014-03-12 09:11:05 UTC
Patch tested with a sandbox, by remy juliette <juliette.levast@iepg.fr>
Comment 7 Biblibre Sandboxes 2014-03-12 09:11:30 UTC Comment hidden (obsolete)
Comment 8 Biblibre Sandboxes 2014-03-12 09:11:33 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2014-03-12 18:16:47 UTC
Sorry Jonathan, it's Acquisition.t again - could you take a look?
Comment 10 Jonathan Druart 2014-03-13 10:34:50 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2014-03-13 10:34:55 UTC Comment hidden (obsolete)
Comment 12 Katrin Fischer 2014-03-13 13:59:13 UTC
Created attachment 26281 [details] [review]
[PASSED QA] Bug 11551: Add unit tests for GetHistory

prove t/db_dependent/Acquisition.t should return green.

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 13 Katrin Fischer 2014-03-13 13:59:26 UTC
Created attachment 26282 [details] [review]
[PASSED QA] Bug 11551: Allow to search on parent ordernumber in histsearch.pl

It is now possible to search on the ordernumber on the order search
page.

Also search on parent_ordernumber is possible. Like that, you are allow
to search children for a given ordernumber.

Test plan:
1/ create a basket and 1 order with at least 2 items.
2/ receive partialy the order (receive only 1 item).
3/ note that a new ordernumber is created for item not received.
4/ go on the order search form and search for the original ordernumber
without checking the new checkbox "Display children too." => only 1
order (the parent) is displayed.
5/ now check the checkbox and search again => the parent order is
displayed but children too.

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Comment 14 Galen Charlton 2014-04-21 04:30:09 UTC
Pushed to master.  Thanks, Jonathan and Julian!
Comment 15 Fridolin Somers 2014-09-10 14:48:09 UTC
Does not apply easily to 3.14.x so I set as resolved.