Bug 34880 - Receive impossible if items created 'in cataloguing'
Summary: Receive impossible if items created 'in cataloguing'
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords: rel_23_05_candidate
Depends on: 34736
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-22 08:11 UTC by Katrin Fischer
Modified: 2023-10-12 16:09 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04


Attachments
Bug 34880: Fix order receive for standing orders (1.09 KB, patch)
2023-09-22 08:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34880: Fix order receive for standing orders (1.14 KB, patch)
2023-09-22 09:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34880: (follow-up) Make condition more specific (2.81 KB, patch)
2023-09-22 09:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34880: Fix order receive for standing orders (1.20 KB, patch)
2023-09-22 12:01 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 34880: (follow-up) Make condition more specific (2.87 KB, patch)
2023-09-22 12:01 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 34880: Fix order receive for standing orders (1.27 KB, patch)
2023-09-22 12:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34880: (follow-up) Make condition more specific (2.94 KB, patch)
2023-09-22 12:42 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-09-22 08:11:33 UTC
To test:

* 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)

This means that libraries can't process orders and requires an urgent fix.
Comment 1 Katrin Fischer 2023-09-22 08:20:10 UTC
I did a git bisect and it points to bug 34736.
Comment 2 Jonathan Druart 2023-09-22 08:25:51 UTC
Created attachment 156036 [details] [review]
Bug 34880: Fix order receive for standing orders
Comment 3 Jonathan Druart 2023-09-22 08:26:21 UTC
Probable fix, but what about possible side-effects?
Comment 4 Katrin Fischer 2023-09-22 08:37:24 UTC
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.
Comment 5 Katrin Fischer 2023-09-22 09:11:37 UTC
Created attachment 156043 [details] [review]
Bug 34880: Fix order receive for standing orders

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 6 Katrin Fischer 2023-09-22 09:11:39 UTC
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>
Comment 7 Biblibre Sandboxes 2023-09-22 12:01:07 UTC
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>
Comment 8 Biblibre Sandboxes 2023-09-22 12:01:10 UTC
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>
Comment 9 Jonathan Druart 2023-09-22 12:42:18 UTC
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>
Comment 10 Jonathan Druart 2023-09-22 12:42:21 UTC
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>
Comment 11 Tomás Cohen Arazi 2023-09-22 13:56:27 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 12 Fridolin Somers 2023-09-22 19:18:26 UTC
Pushed to 23.05.x for 23.05.04
Comment 13 Matt Blenkinsop 2023-10-12 16:09:19 UTC
Dependency missing for 22.11.x - not backporting