[Bug 35004] New: Error about no quantity set on acquisitions order receive confirmation.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Bug ID: 35004 Summary: Error about no quantity set on acquisitions order receive confirmation. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: slavashishkin@gmail.com Reporter: slavashishkin@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 8179, 34736, 33864 An error occurs when receiving the order. This happens if the user does not change the "Quantity received" field value, thereby not triggering the "OnChange" event. By default, the "Quantity received" field value is set to 1 by JS, but there is a row.quantity_received variable which serves as a shadow value which sent in a POST Ajax request after clicking "Confirm", yet row.quantity_received stays undefined despite the fact that we changed the form value by JS. row.quantity_received is expected to be updated on the "onChange" event for the form field, but that event does not fired when JS changes the form field value to 1. So if the user does not change the form field, it has a value of "1" but the form sends an empty value from the shadow value. This leads to an error from the backend which says "No quantity to receive set. No items will be created." in the popup. To test: 1. Add a new basket. 2. Create an order line 3. Receive shipment and create an invoice 4. Start receiving your order: Verify: - Quantity ordered: X - Quantity received: 1 (pre-filled, don't touch or change it) 5. Click "Confirm" 6. Observe the Receive error popup: "Order ZZZ: No quantity to receive set. No items will be created." 7. Verify that "Order receive" was not happen (received orders remains empty) Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8179 [Bug 8179] Receiving multiple order lines at once https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33864 [Bug 33864] Problems in order receive modal https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34736 [Bug 34736] Item checkboxes move to wrong order line in multi-receive, breaking partial receive -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 --- Comment #1 from Slava Shishkin <slavashishkin@gmail.com> --- Created attachment 156634 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156634&action=edit Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we're in 'cataloguing' mode Before the code changes only field value was set to 1, but "row.quantity_received" still had an undefined value. After correction row.quantity_received set to 1 if it is empty, but only when effective_create_items == 'cataloguing', and after that its value assigned to the form field. To test: 1. Add a new basket. 2. Create an order line 3. Receive shipment and create an invoice 4. Start receiving your order: Verify: - Quantity ordered: X - Quantity received: 1 (pre-filled, don't touch or change it) 5. Click "Confirm" 6. Observe the Receive error popup: "Order ZZZ: No quantity to receive set. No items will be created." 7. Verify that "Order receive" was not happen (received orders remains empty) 8. Apply the patch and make sure your order is received correctly after step 5. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Slava, did you test on latest master? This reads like bug 34880. + $("#creator").html(__("Account has been deleted")); This won't work, the __ is only for .js files, not for JavaScript in general. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- In your test plan, which value did you set for creating items? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34880 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #3)
In your test plan, which value did you set for creating items?
Standing order? Subscription order? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 --- Comment #5 from Slava Shishkin <slavashishkin@gmail.com> --- (In reply to Katrin Fischer from comment #2)
Hi Slava,
did you test on latest master? This reads like bug 34880.
Hi Katrin, Yes, I checked this on the latest master. (In reply to Katrin Fischer from comment #4)
In your test plan, which value did you set for creating items?
Standing order? Subscription order?
The basket was closed before receiving items. It wasn't "Orders are standing" or "Subscription order". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Bug 35004 depends on bug 34736, which changed state. Bug 34736 Summary: Item checkboxes move to wrong order line in multi-receive, breaking partial receive https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34736 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, to be late here. I just confirmed this bug in the recent 23.05, possibly in master as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Nick Clemens <nick@bywatersolutions.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=35004 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156634|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 158334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158334&action=edit Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we're in 'cataloguing' mode Before the code changes only field value was set to 1, but "row.quantity_received" still had an undefined value. After correction row.quantity_received set to 1 if it is empty, but only when effective_create_items == 'cataloguing', and after that its value assigned to the form field. To test: 1. Add a new basket. 2. Create an order line 3. Receive shipment and create an invoice 4. Start receiving your order: Verify: - Quantity ordered: X - Quantity received: 1 (pre-filled, don't touch or change it) 5. Click "Confirm" 6. Observe the Receive error popup: "Order ZZZ: No quantity to receive set. No items will be created." 7. Verify that "Order receive" was not happen (received orders remains empty) 8. Apply the patch and make sure your order is received correctly after step 5. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have amended the patch removing this change: $("#creator").html(_("Account has been deleted")); $("#creator").html(__("Account has been deleted")); The double undescore for translations is only used in .js files. In .inc and embedded JavaScript code it doesn't work. We still need the single underscore there. Continuing testing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Michaela Sieber <michaela.sieber@kit.edu> 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=35004 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Did a lot of testing, hopefully not missing anything this time: Items in cataloging * ordered 1, receive 1 * ordered 5, receive 2 * standing order, received on multiple invoices * subscription* * subscription + standing order* Items on receive * ordered 1, receive 1 * ordered 5, receive 2 * standing order, received on multiple invoices * subscription* * subscription + standing order* Items on order * ordered 1, receive 1 * ordered 5, receive 2 * standing order, received on multiple invoices * subscription (no items, because it's a subscription order)* * subscription + standing order (no items, because it's a subscription order)* -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158334|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158336&action=edit Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we're in 'cataloguing' mode Before the code changes only field value was set to 1, but "row.quantity_received" still had an undefined value. After correction row.quantity_received set to 1 if it is empty, but only when effective_create_items == 'cataloguing', and after that its value assigned to the form field. To test: 1. Add a new basket. 2. Create an order line 3. Receive shipment and create an invoice 4. Start receiving your order: Verify: - Quantity ordered: X - Quantity received: 1 (pre-filled, don't touch or change it) 5. Click "Confirm" 6. Observe the Receive error popup: "Order ZZZ: No quantity to receive set. No items will be created." 7. Verify that "Order receive" was not happen (received orders remains empty) 8. Apply the patch and make sure your order is received correctly after step 5. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Error about no quantity set |Cannot receive order lines |on acquisitions order |with items created in |receive confirmation. |cataloguing Severity|normal |blocker Status|Passed QA |Signed Off 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=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 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=35004 --- Comment #11 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=35004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_05_candidate --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks for the quick push! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Danyon Sewell <danyonsewell@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |danyonsewell@catalyst.net.n | |z --- Comment #13 from Danyon Sewell <danyonsewell@catalyst.net.nz> --- *** Bug 35296 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Patch complexity|--- |Trivial patch CC| |fridolin.somers@biblibre.co | |m Version(s)|23.11.00 |23.11.00,23.05.06 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35004 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |pedro.amorim@ptfs-europe.co | |m Status|Pushed to stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org