[Koha-bugs] [Bug 12891] NewOrder does not return ordernumber
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Sep 9 16:46:55 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891
Dobrica Pavlinusic <dpavlin at rot13.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #31470|0 |1
is obsolete| |
--- Comment #2 from Dobrica Pavlinusic <dpavlin at rot13.org> ---
Created attachment 31492
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31492&action=edit
Bug 12891: NewOrder does not return ordernumber if ordernumber is defined
The behavior is quite weird, but
$schema->resultset('Table')->create($data)->id
does not return the id inserted if $data contains the key.
To be more clear, in this case
$schema->resultset('Aqorder')->create($new_order)->id
returns an empty string because $new_order->{ordernumber} is an empty
string!
This was not caught by the unit tests, I added one.
Test plan:
- AcqCreateItem set to ordering
- Create an order with items and verify items are correctly linked to the
order.
Signed-off-by: Dobrica Pavlinusic <dpavlin at rot13.org>
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list