Bug 24522

Summary: Nothing happens when trying to add nothing to a list in staff
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Staff interfaceAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, gmcharlt, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11
Attachments: Bug 24522: Show alert when trying to add nothing to a list in staff
Bug 24522: Show alert when trying to add nothing to a list in staff
Bug 24522: Show alert when trying to add nothing to a list in staff

Description Katrin Fischer 2020-01-27 21:29:22 UTC
When no entries are selected in a staff search results list and 'add to list' is used, nothing happens.
Try the same in the OPAC and a message "No item was selected" will display.
We should have a message for the staff client as well.

Note: For better translatability it would be nice to avoid item here - maybe 'search result' or 'record' would work?
Comment 1 Owen Leonard 2020-05-01 13:27:50 UTC
Created attachment 104090 [details] [review]
Bug 24522: Show alert when trying to add nothing to a list in staff

This patch modifies the JavaScript which handles the process of adding
items to a list in the staff client. Error-handling is added in the case
when a set of biblionumbers hasn't been passed to the vShelf function.

To test, apply the patch and perform a catalog search in the staff
client.

On the search results page, select any list from the "Add to list" menu
at the top of the search results table without checking any checkboxes.

You should get an alert, "No item was selected."

Also test that adding to a list works correctly after selecting one or
more titles.
Comment 2 Lucas Gass 2020-05-01 16:47:15 UTC
Created attachment 104130 [details] [review]
Bug 24522: Show alert when trying to add nothing to a list in staff

This patch modifies the JavaScript which handles the process of adding
items to a list in the staff client. Error-handling is added in the case
when a set of biblionumbers hasn't been passed to the vShelf function.

To test, apply the patch and perform a catalog search in the staff
client.

On the search results page, select any list from the "Add to list" menu
at the top of the search results table without checking any checkboxes.

You should get an alert, "No item was selected."

Also test that adding to a list works correctly after selecting one or
more titles.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Katrin Fischer 2020-05-01 20:56:41 UTC
Created attachment 104136 [details] [review]
Bug 24522: Show alert when trying to add nothing to a list in staff

This patch modifies the JavaScript which handles the process of adding
items to a list in the staff client. Error-handling is added in the case
when a set of biblionumbers hasn't been passed to the vShelf function.

To test, apply the patch and perform a catalog search in the staff
client.

On the search results page, select any list from the "Add to list" menu
at the top of the search results table without checking any checkboxes.

You should get an alert, "No item was selected."

Also test that adding to a list works correctly after selecting one or
more titles.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2020-05-04 08:30:55 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-05-11 20:36:30 UTC
Backported to 19.11.x for 19.11.06
Comment 6 Lucas Gass 2020-05-15 20:18:45 UTC
backported to 19.05.x for 19.05.11