Bug 24522 - Nothing happens when trying to add nothing to a list in staff
Summary: Nothing happens when trying to add nothing to a list in staff
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-27 21:29 UTC by Katrin Fischer
Modified: 2020-05-15 20:18 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
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 (1.36 KB, patch)
2020-05-01 13:27 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24522: Show alert when trying to add nothing to a list in staff (1.41 KB, patch)
2020-05-01 16:47 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 24522: Show alert when trying to add nothing to a list in staff (1.47 KB, patch)
2020-05-01 20:56 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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