Bug 13319 - On inserting an order, the parent_ordernumber attribute is not set to the object
Summary: On inserting an order, the parent_ordernumber attribute is not set to the object
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 12830
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-21 11:21 UTC by Jonathan Druart
Modified: 2015-12-03 22:02 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber (3.71 KB, patch)
2014-11-21 11:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber (3.77 KB, patch)
2014-12-26 20:08 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber (3.84 KB, patch)
2014-12-27 11:40 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-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