[Bug 34469] New: Modifying an order line of a standing order will delete linked invoice ID
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Bug ID: 34469 Summary: Modifying an order line of a standing order will delete linked invoice ID Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org When modifying a received order line from a standing order, the invoice id in the order line will be emptied out, leaving you with an order line that is complete, but not linked to an invoice (= inconsistent state, data loss) This cannot be resolved in the GUI, since you can't 'cancel receipt' for this order line, since it's not linked to an invoice any more. The only way to fix things is with SQL. And there is no way to find out which invoice the order line was originally received in. To test: * Create basket as standing order with items added in cataloguing * Add an order line * Receive shipment * Go to the basket summary page, click on 'Modify' * Change the actual cost * Save * Verify that the invoice is now empty * In the database aqorders.invoiceid will be NULL -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Solution: it should not be possible to modify received order lines in any basket. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #2 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- *** Bug 34254 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 154287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154287&action=edit Bug 34469: Block editing for received order lines When an already received order line is modified/edited, we experience data loss. Most prominently, we will lose the linked invoiceid. Therefore we should not allow editing an order line that was already received. If something needs to be changed, the receipt should be cancelled first. To test: * Create basket as standing order with items added in cataloguing * Add an order line * Receive shipment * Go to the basket summary page, click on 'Modify' * Change the actual cost * Save * Verify that the invoice is now empty * In the database aqorders.invoiceid will be NULL * Apply patch * Receive another shipment for the standing order * Go back to basket summary page * Verify the 'Modify' link is no longer present * Click 'Modify' on the unreceived order line * Edit the URL parameter odernumber to have the number of an already received order line * Verify you see a nice error message: This order cannot be edited, the basket is closed or the order was already received. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154287|0 |1 is obsolete| | --- Comment #4 from Sam Lau <samalau@gmail.com> --- Created attachment 154288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154288&action=edit Bug 34469: Block editing for received order lines When an already received order line is modified/edited, we experience data loss. Most prominently, we will lose the linked invoiceid. Therefore we should not allow editing an order line that was already received. If something needs to be changed, the receipt should be cancelled first. To test: * Create basket as standing order with items added in cataloguing * Add an order line * Receive shipment * Go to the basket summary page, click on 'Modify' * Change the actual cost * Save * Verify that the invoice is now empty * In the database aqorders.invoiceid will be NULL * Apply patch * Receive another shipment for the standing order * Go back to basket summary page * Verify the 'Modify' link is no longer present * Click 'Modify' on the unreceived order line * Edit the URL parameter odernumber to have the number of an already received order line * Verify you see a nice error message: This order cannot be edited, the basket is closed or the order was already received. Signed-off-by: Sam Lau <samalau@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #5 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Hi Katrin, Thank you so much for working on this patch! In testing, everything was working as described until these steps: * Click 'Modify' on the unreceived order line * Edit the URL parameter ordernumber to have the number of an already received order line. When I edited the URL parameter with an order number that was already received, it let me make modifications without receiving an error message. I then confirmed that the received item line was removed from the invoice. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #6 from Michaela Sieber <michaela.sieber@kit.edu> --- (In reply to Laura Escamilla from comment #5)
When I edited the URL parameter with an order number that was already received, it let me make modifications without receiving an error message. I then confirmed that the received item line was removed from the invoice.
Hi Laura, I tried to reproduce that in a sandbox and there is an error message : "This order cannot be edited, the basket is closed or the order was already received." Please have a look here: http://staff-b34469.sandboxes.ptfs-europe.co.uk/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=3&booksellerid=1&basketno=2 Acq Log is active and there is a SQL-Report for aqorders. I also checked the use case described in bug 34254 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Laura Escamilla from comment #5)
Hi Katrin,
Thank you so much for working on this patch!
In testing, everything was working as described until these steps: * Click 'Modify' on the unreceived order line * Edit the URL parameter ordernumber to have the number of an already received order line.
When I edited the URL parameter with an order number that was already received, it let me make modifications without receiving an error message. I then confirmed that the received item line was removed from the invoice.
Hi Laura, that's not nice! It looks like I committed all changes and it worked for me (on the other computer) - I'll retest, but maybe you could confirm that you did a restart_all before testing? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Now I overlapped with Michaela also testing - glad to see the acq bugs getting so much attention :) Hope we can resolve! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #9 from Michaela Sieber <michaela.sieber@kit.edu> --- Created attachment 154293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154293&action=edit Error Message order cannot be edited, the order was already received. Message: order cannot be edited, the basket is closed or the order was already received. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154288|0 |1 is obsolete| | --- Comment #10 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 154294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154294&action=edit Bug 34469: Block editing for received order lines When an already received order line is modified/edited, we experience data loss. Most prominently, we will lose the linked invoiceid. Therefore we should not allow editing an order line that was already received. If something needs to be changed, the receipt should be cancelled first. To test: * Create basket as standing order with items added in cataloguing * Add an order line * Receive shipment * Go to the basket summary page, click on 'Modify' * Change the actual cost * Save * Verify that the invoice is now empty * In the database aqorders.invoiceid will be NULL * Apply patch * Receive another shipment for the standing order * Go back to basket summary page * Verify the 'Modify' link is no longer present * Click 'Modify' on the unreceived order line * Edit the URL parameter odernumber to have the number of an already received order line * Verify you see a nice error message: This order cannot be edited, the basket is closed or the order was already received. Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #11 from Michaela Sieber <michaela.sieber@kit.edu> --- status back to signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #12 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- (In reply to Michaela Sieber from comment #11)
status back to signed Off
My apologies, Katrin! I missed that pesky restart_all step! It works as expected and I did in fact get the error message. Thank you again for working on this patch so quickly! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Laura Escamilla from comment #12)
(In reply to Michaela Sieber from comment #11)
status back to signed Off
My apologies, Katrin! I missed that pesky restart_all step! It works as expected and I did in fact get the error message.
Thank you again for working on this patch so quickly!
Glad that resolved it :) And very happy to be able to kill an evil bug! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154294|0 |1 is obsolete| | --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 154356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154356&action=edit Bug 34469: Block editing for received order lines When an already received order line is modified/edited, we experience data loss. Most prominently, we will lose the linked invoiceid. Therefore we should not allow editing an order line that was already received. If something needs to be changed, the receipt should be cancelled first. To test: * Create basket as standing order with items added in cataloguing * Add an order line * Receive shipment * Go to the basket summary page, click on 'Modify' * Change the actual cost * Save * Verify that the invoice is now empty * In the database aqorders.invoiceid will be NULL * Apply patch * Receive another shipment for the standing order * Go back to basket summary page * Verify the 'Modify' link is no longer present * Click 'Modify' on the unreceived order line * Edit the URL parameter odernumber to have the number of an already received order line * Verify you see a nice error message: This order cannot be edited, the basket is closed or the order was already received. Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Added Laura's signoff :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, makes sense, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.03 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.03 |23.11.00,23.05.03,22.11.09 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 --- Comment #19 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Nice work everyone! Pushed to 22.11.x for next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34469 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=6819, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=6729 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org