Summary: | Incorrect alert while deleting single item in batch | ||
---|---|---|---|
Product: | Koha | Reporter: | Indranil Das Gupta <indradg> |
Component: | Templates | Assignee: | Indranil Das Gupta <indradg> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | f.demians, kyle, liz, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15663 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 14676 | ||
Bug Blocks: | |||
Attachments: |
Bug 14632 - Fix alert message for single item batch
Bug 14632 - Fix alert message for single item batch [PASSED QA] Bug 14632 - Fix alert message for single item batch [PASSED QA] Bug 14632 - Fix alert message for single item batch [PASSED QA] Bug 14632 [QA Followup] - Restore missing "Delete batch" button. |
Description
Indranil Das Gupta
2015-08-03 02:14:28 UTC
(In reply to Indranil Das Gupta from comment #0)> > However, the JS alert's message reads as "Please select at least label to > delete.". This is incorrect as one item is already selected. The function Remove() checks for document.items.action.length > 0. In cases of batches with only a single item / patron, this test fails. Created attachment 41307 [details] [review] Bug 14632 - Fix alert message for single item batch Fixes the incorrect msg "Please select at least label to delete." for attempts to delete from single patron batches. Notifies the user that doing so will delete the batch. It disallows direct deletion, instead suggests the users to use the 'Delete batch' option assuming the users know what they are doing. Test plan ========= 1/ Load a single patron batch in edit mode and attempt to delete the single record. The JS alert message will inform that "Please select at least label to delete." 2/ Apply patch and refresh page and try to delete the single record again. 3/ This time the alert will inform the user that doing so will delete the batch and should that be desired action to choose the 'Delete batch' option from the toolbar. Created attachment 44332 [details] [review] Bug 14632 - Fix alert message for single item batch Fixes the incorrect msg "Please select at least label to delete." for attempts to delete from single patron batches. Notifies the user that doing so will delete the batch. It disallows direct deletion, instead suggests the users to use the 'Delete batch' option assuming the users know what they are doing. Test plan ========= 1/ Load a single patron batch in edit mode and attempt to delete the single record. The JS alert message will inform that "Please select at least label to delete." 2/ Apply patch and refresh page and try to delete the single record again. 3/ This time the alert will inform the user that doing so will delete the batch and should that be desired action to choose the 'Delete batch' option from the toolbar. Signed-off-by: Frederic Demians <f.demians@tamil.fr> It works as before but with an understantable warning message. Created attachment 44564 [details] [review] [PASSED QA] Bug 14632 - Fix alert message for single item batch Fixes the incorrect msg "Please select at least label to delete." for attempts to delete from single patron batches. Notifies the user that doing so will delete the batch. It disallows direct deletion, instead suggests the users to use the 'Delete batch' option assuming the users know what they are doing. Test plan ========= 1/ Load a single patron batch in edit mode and attempt to delete the single record. The JS alert message will inform that "Please select at least label to delete." 2/ Apply patch and refresh page and try to delete the single record again. 3/ This time the alert will inform the user that doing so will delete the batch and should that be desired action to choose the 'Delete batch' option from the toolbar. Signed-off-by: Frederic Demians <f.demians@tamil.fr> It works as before but with an understantable warning message. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 44565 [details] [review] [PASSED QA] Bug 14632 - Fix alert message for single item batch Fixes the incorrect msg "Please select at least label to delete." for attempts to delete from single patron batches. Notifies the user that doing so will delete the batch. It disallows direct deletion, instead suggests the users to use the 'Delete batch' option assuming the users know what they are doing. Test plan ========= 1/ Load a single patron batch in edit mode and attempt to delete the single record. The JS alert message will inform that "Please select at least label to delete." 2/ Apply patch and refresh page and try to delete the single record again. 3/ This time the alert will inform the user that doing so will delete the batch and should that be desired action to choose the 'Delete batch' option from the toolbar. Signed-off-by: Frederic Demians <f.demians@tamil.fr> It works as before but with an understantable warning message. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 44566 [details] [review] [PASSED QA] Bug 14632 [QA Followup] - Restore missing "Delete batch" button. This button was removed by accident in bug 14676 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Upping severity due to missing "Delete batch" button. Patch could be split into a separate bug if need be. Patches pushed to master. Thanks Indranil and Kyle! This patch has been pushed to 3.20.x, will be in 3.20.6. (1st patch but not the followup.) Pushed to 3.18.13, and released. |