Bug 13319

Summary: On inserting an order, the parent_ordernumber attribute is not set to the object
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, katrin.fischer, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12830    
Bug Blocks:    
Attachments: Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber
Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber
[PASSED QA] Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber

Description Jonathan Druart 2014-11-21 11:21:09 UTC
I am not sure about the consequence of this on master.
I found this bug on working on new patches.
Comment 1 Jonathan Druart 2014-11-21 11:26:12 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-12-26 20:08:10 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-12-27 11:40:30 UTC
Created attachment 34702 [details] [review]
[PASSED QA] Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber

The tests highligh the problem: if the parent_ordernumber attribute is
not set on inserting an order, the object returned by the method does
not contain the value (undef).

Test plan:
Verify the tests are consistent and
    prove t/db_dependent/Acquisition/CancelReceipt.t
should return green.

You can also verify that receive partially an order and cancel the
receipt work as expected.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2014-12-27 11:41:49 UTC
Tested partial receives and 'undoing' the receipt. 
Tests didn't run on my normal database with acq data, but passed on a database without.
Comment 5 Tomás Cohen Arazi 2015-02-10 17:09:45 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 6 Chris Cormack 2015-02-14 07:28:21 UTC
Pushed to 3.18.x will be in 3.18.4