Bug 33784

Summary: Save clicks on single order receive
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low CC: jonathan.druart, matt.blenkinsop, michaela.sieber, nugged, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00
Circulation function:
Bug Depends on: 8179    
Bug Blocks: 33864, 34036    
Attachments: Bug 33784: Don't display the multi receive form for single receive
Bug 33784: Don't display the multi receive form for single receive
Bug 33784: Make buttons more meaningful
Bug 33784: Make buttons more meaningful
Bug 33784: Don't display the multi receive form for single receive
Bug 33784: Make buttons more meaningful

Description Caroline Cyr La Rose 2023-05-19 14:19:29 UTC
With bug 8179, a new step was added when receiving a single item. This extra step is not useful and adds clicks for the staff member who is receiving orders.

To recreate:

- Make sure you have budgets and vendors set up

1. Create a basket
   1.1. Go to Acquisitions
   1.2. Search for a vendor
   1.3. Click New > Basket
   1.4. Fill out the basket form
   1.5. Click Save

2. Add at least one order to the basket
   2.1. Click Add to basket
   2.2. Click From a new (empty) record
   2.3. Fill out the order form
   2.4. Click Save

3. Click Close basket and confirm

4. Click Receive shipments

5. Fill out the invoice form and click Next

6. Click the Receive link on the right of the order
   --> This used to bring to the receive form, now you are brought to an intermediary page that I think it meant for multi-receiving

*7. Click Edit

8. Edit the quantity received

9. Click Save changes

*10. Click Confirm

The two steps with asterisks are extra clicks from the old workflow.
Comment 1 Katrin Fischer 2023-05-19 14:31:17 UTC
2 extra clicks for single receive vs a multiple one is a real issue.

We need to bring that down to the old number of clicks for a single receive or this will be seen as a serious regression.
Comment 2 Jonathan Druart 2023-05-23 08:06:57 UTC
Created attachment 151552 [details] [review]
Bug 33784: Don't display the multi receive form for single receive

With bug 8179, a new step was added when receiving a single item.
This extra step is not useful and adds clicks for the staff member who is receiving orders.
Comment 3 Jonathan Druart 2023-05-23 08:09:33 UTC
This patch is not ideal but bug 8179 has not designed the code to make it reusable. It must have been moved to a different file (instead of making orderreceive.tt bigger than it was already). We could have displayed the modal from the parcel page.

This patch is suggesting to hijack the JS code and click on the "edit" and "save" button.

However it does not fully work

There is a problem in the following situation:
* Receive one and only one order
* Don't change the quantity (0) and click "save changes"
* Click "cancel" in the warning alert box
=> There is a .modal-backdrop that is on top of everything, the UI is stuck
Comment 4 Tomás Cohen Arazi (tcohen) 2023-05-24 13:23:24 UTC Comment hidden (obsolete)
Comment 5 Tomás Cohen Arazi (tcohen) 2023-05-24 13:23:27 UTC Comment hidden (obsolete)
Comment 6 Tomás Cohen Arazi (tcohen) 2023-05-24 13:33:44 UTC
Created attachment 151628 [details] [review]
Bug 33784: Make buttons more meaningful

This patch makes dismissing the modal equivalent to cancelling the
receipt and thus returning to parcel.pl.

The 'Save' button is renamed to 'Confirm' and is disabled when no items
are selected for receiving.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Jonathan Druart 2023-05-24 13:40:48 UTC
Created attachment 151629 [details] [review]
Bug 33784: Don't display the multi receive form for single receive

With bug 8179, a new step was added when receiving a single item.
This extra step is not useful and adds clicks for the staff member who is receiving orders.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2023-05-24 13:40:51 UTC
Created attachment 151630 [details] [review]
Bug 33784: Make buttons more meaningful

This patch makes dismissing the modal equivalent to cancelling the
receipt and thus returning to parcel.pl.

The 'Save' button is renamed to 'Confirm' and is disabled when no items
are selected for receiving.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-05-24 14:22:33 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 10 Matt Blenkinsop 2023-06-08 17:12:53 UTC
Dependencies missing - not backporting to 22.11.x