[Bug 12891] New: NewOrder does not return ordernumber
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Bug ID: 12891 Summary: NewOrder does not return ordernumber Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12626 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31470 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31470&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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31470|0 |1 is obsolete| | --- Comment #2 from Dobrica Pavlinusic <dpavlin@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@rot13.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 --- Comment #3 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Thanks, this fixes regression. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|12626 | Depends on| |12626 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31492|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 31515 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31515&action=edit [PASSED QA] 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@rot13.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Confirmed that without the patch the created item is not linked to the order (entry in aqorders_items). With the patch, it works as expected. Passes tests and Koha QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12830 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12827 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|12830 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12891 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org