Summary: | Single receive doesn't reload data and order lines don't appear in received section | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Acquisitions | Assignee: | Aleisha Amohia <aleisha> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, fridolin.somers, matt.blenkinsop, michaela.sieber, tomascohen, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04
|
|
Circulation function: | |||
Bug Depends on: | 33784 | ||
Bug Blocks: | |||
Attachments: |
Bug 34036: Reload 'already received' table when edit modal closed
Bug 34036: Reload 'already received' table when edit modal closed Bug 34036: Reload 'already received' table when edit modal closed |
Description
Katrin Fischer
2023-06-16 13:05:47 UTC
I just tested this again and it looks like the "Pending orders" table reloads, updating the Quantity if you do a partial receive, but the "Already received" table is not updated. It looks like the "Already received" is not yet API driven, but in this case we need to force a page reload maybe? ... or make it API driven, but that's the harder fix. *** Bug 34595 has been marked as a duplicate of this bug. *** (In reply to Katrin Fischer from comment #2) > It looks like the "Already received" is not yet API driven, but in this case > we need to force a page reload maybe? I think this might be the best way to do it now yeah Created attachment 155049 [details] [review] Bug 34036: Reload 'already received' table when edit modal closed Bug 33784 introduced a fix that prevents the 'already received' table from reloading completely if the modal is hidden and there is only one order in the table. This appears to assume that the 'hidden modal' event is only triggered if the receive form is cancelled, but the 'hidden modal' event is also triggered when the receive form is submitted. This means that the table isn't redrawn when the form is submitted and there's one order already received, so the next order does not show in the table when the page reloads. To test: 1. Set up a vendor, budget, fund, and create a new basket. 2. Add two orders (two different records) to this basket. 3. Close the basket and go to receive the orders. 4. Once on the 'Receive orders' page, use the checkboxes in the Pending orders table to receive both orders at once. Choose the 'Receive selected' button 5. Click Edit for the first order, receive the item and click 'Next order'. Receive the next item and click 'Save changes'. Then Confirm 6. Both orders should now show under Already received. Click Cancel receipt for one of the orders. It should go back to Pending orders. 7. Click Receive for the now pending order. Receive the item and Confirm. 8. Notice that the page appears to reload but the order doesn't show under Already received with the other order. The order also no longer shows under Pending orders. 9. Apply the patch and restart services. Reload the page. Cancel receipt of the order again. 10. Click Receive for the now pending order. Receive the item and Confirm. 11. The Already received table should reload so that both orders now show under Already received. 12. Click Cancel receipt for the order. 13. Click Receive for the now pending order, then Cancel without receiving the item. 14. Confirm the page loads as expected with one pending order and one already received order. Sponsored-by: Toi Ohomai Institute of Technology Created attachment 155058 [details] [review] Bug 34036: Reload 'already received' table when edit modal closed Bug 33784 introduced a fix that prevents the 'already received' table from reloading completely if the modal is hidden and there is only one order in the table. This appears to assume that the 'hidden modal' event is only triggered if the receive form is cancelled, but the 'hidden modal' event is also triggered when the receive form is submitted. This means that the table isn't redrawn when the form is submitted and there's one order already received, so the next order does not show in the table when the page reloads. To test: 1. Set up a vendor, budget, fund, and create a new basket. 2. Add two orders (two different records) to this basket. 3. Close the basket and go to receive the orders. 4. Once on the 'Receive orders' page, use the checkboxes in the Pending orders table to receive both orders at once. Choose the 'Receive selected' button 5. Click Edit for the first order, receive the item and click 'Next order'. Receive the next item and click 'Save changes'. Then Confirm 6. Both orders should now show under Already received. Click Cancel receipt for one of the orders. It should go back to Pending orders. 7. Click Receive for the now pending order. Receive the item and Confirm. 8. Notice that the page appears to reload but the order doesn't show under Already received with the other order. The order also no longer shows under Pending orders. 9. Apply the patch and restart services. Reload the page. Cancel receipt of the order again. 10. Click Receive for the now pending order. Receive the item and Confirm. 11. The Already received table should reload so that both orders now show under Already received. 12. Click Cancel receipt for the order. 13. Click Receive for the now pending order, then Cancel without receiving the item. 14. Confirm the page loads as expected with one pending order and one already received order. Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 155273 [details] [review] Bug 34036: Reload 'already received' table when edit modal closed Bug 33784 introduced a fix that prevents the 'already received' table from reloading completely if the modal is hidden and there is only one order in the table. This appears to assume that the 'hidden modal' event is only triggered if the receive form is cancelled, but the 'hidden modal' event is also triggered when the receive form is submitted. This means that the table isn't redrawn when the form is submitted and there's one order already received, so the next order does not show in the table when the page reloads. To test: 1. Set up a vendor, budget, fund, and create a new basket. 2. Add two orders (two different records) to this basket. 3. Close the basket and go to receive the orders. 4. Once on the 'Receive orders' page, use the checkboxes in the Pending orders table to receive both orders at once. Choose the 'Receive selected' button 5. Click Edit for the first order, receive the item and click 'Next order'. Receive the next item and click 'Save changes'. Then Confirm 6. Both orders should now show under Already received. Click Cancel receipt for one of the orders. It should go back to Pending orders. 7. Click Receive for the now pending order. Receive the item and Confirm. 8. Notice that the page appears to reload but the order doesn't show under Already received with the other order. The order also no longer shows under Pending orders. 9. Apply the patch and restart services. Reload the page. Cancel receipt of the order again. 10. Click Receive for the now pending order. Receive the item and Confirm. 11. The Already received table should reload so that both orders now show under Already received. 12. Click Cancel receipt for the order. 13. Click Receive for the now pending order, then Cancel without receiving the item. 14. Confirm the page loads as expected with one pending order and one already received order. Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.04 Missing dependencies in 22.11.x - not backporting Nice work everyone! |