Description
Katrin Fischer
2023-09-22 08:11:33 UTC
Created attachment 156036 [details] [review] Bug 34880: Fix order receive for standing orders Probable fix, but what about possible side-effects? The attached patch fixes: * Standing order + Item created in cataloguing The attached patch breaks: * Standing order + Item created on receive Without the patch the quantity received is 0 and increased to 1 when the item form is submitted. With the patch, the quantity received is 1 and we get an error on saving the item form because it tries to increase above the 'ordered' value. Created attachment 156043 [details] [review] Bug 34880: Fix order receive for standing orders Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 156044 [details] [review] Bug 34880: (follow-up) Make condition more specific To test (applies to both patches): * Add a new basket as 'standing order' and with 'items created in cataloguing' * Create an order line * Receive shipment and create an invoice * Receive your order * Verify: * Quantity ordered: 1 * Quantity received: 1 (pre-filled) * No item form on the right * Confirm * Receive error: Order X: No quantity to receive set. No items will be created. * Verify no receive was processed (received orders remains empty) * Apply patch * Verify receive works as expected Other possible combinations to test: * Standing order, items on receive * Standing order, items on order (no items are created) * Standing order + order from subscription + any item setting (no items are created) * No standing order + items in cataloguing * No standing order + items on receive * No standing order + items on order * No standing oder + order from subscription + all item settings (no items are created) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 156075 [details] [review] Bug 34880: Fix order receive for standing orders Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 156076 [details] [review] Bug 34880: (follow-up) Make condition more specific To test (applies to both patches): * Add a new basket as 'standing order' and with 'items created in cataloguing' * Create an order line * Receive shipment and create an invoice * Receive your order * Verify: * Quantity ordered: 1 * Quantity received: 1 (pre-filled) * No item form on the right * Confirm * Receive error: Order X: No quantity to receive set. No items will be created. * Verify no receive was processed (received orders remains empty) * Apply patch * Verify receive works as expected Other possible combinations to test: * Standing order, items on receive * Standing order, items on order (no items are created) * Standing order + order from subscription + any item setting (no items are created) * No standing order + items in cataloguing * No standing order + items on receive * No standing order + items on order * No standing oder + order from subscription + all item settings (no items are created) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 156085 [details] [review] Bug 34880: Fix order receive for standing orders Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 156086 [details] [review] Bug 34880: (follow-up) Make condition more specific To test (applies to both patches): * Add a new basket as 'standing order' and with 'items created in cataloguing' * Create an order line * Receive shipment and create an invoice * Receive your order * Verify: * Quantity ordered: 1 * Quantity received: 1 (pre-filled) * No item form on the right * Confirm * Receive error: Order X: No quantity to receive set. No items will be created. * Verify no receive was processed (received orders remains empty) * Apply patch * Verify receive works as expected Other possible combinations to test: * Standing order, items on receive * Standing order, items on order (no items are created) * Standing order + order from subscription + any item setting (no items are created) * No standing order + items in cataloguing * No standing order + items on receive * No standing order + items on order * No standing oder + order from subscription + all item settings (no items are created) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.04 Dependency missing for 22.11.x - not backporting |