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.
Created attachment 24278 [details] [review] Bug 11507: 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.
Created attachment 24279 [details] [review] Bug 11551: Add unit tests for GetHistory prove t/db_dependent/Acquisition.t should return green.
Created attachment 24280 [details] [review] 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.
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
(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.
Patch tested with a sandbox, by remy juliette <juliette.levast@iepg.fr>
Created attachment 26141 [details] [review] 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>
Created attachment 26142 [details] [review] 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>
Sorry Jonathan, it's Acquisition.t again - could you take a look?
Created attachment 26249 [details] [review] Bug 11551: Add unit tests for GetHistory prove t/db_dependent/Acquisition.t should return green.
Created attachment 26250 [details] [review] 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.
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>
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.
Pushed to master. Thanks, Jonathan and Julian!
Does not apply easily to 3.14.x so I set as resolved.