In "Manage patron card batches", the user is prevented from deleting the items from a single item batch as that would remove the entry from table creator_batches effectively deleting the batch. However, the JS alert's message reads as "Please select at least label to delete.". This is incorrect as one item is already selected.
(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.