After updating from version 23.11 to 24.05, I found 2 problems with label batches: 1. In the item view of a book, the option "Actions > Print label" is not working anymore. I have to go to the Cataloging module to create a new label batch from there. 2. I cannot delete label batches anymore: The "Delete"-button in the list of label batches is not working. And inside the label batch, the button "Delete label batch" is not working either.
I split number 1 off to bug 37192 because even though they are caused by the same thing (the giant CSRF protection bug), fixing them is going to be different sorts of fixes in widely separated places. The problem with deleting batches is that the script expects the op cud-delete, correctly, and so the request has to be POSTed, but both places in the UI that delete batches just do a GET with ?op=delete.
Not a workaround I'd be happy with, but while testing a patch for bug 37192 I noticed that if you delete all the items in a batch (easy enough if there's only one) and then just walk away, the empty batch is automatically deleted.
Thanks Phil, I was pondering splitting yesterday - it's better.
Created attachment 168156 [details] [review] Bug 37187: Fix deletion of label batches and label templates This patch uses the new form-submit JS to convert the label management deletion link from a GET operation to POST. To test, apply the patch and go to Cataloging -> Label creator. - Click Manage -> Label batches. Create a batch if necessary. - Click the "Delete" button in the "Actions" column. You should get a confirmation message, "Are you sure you want to delete this?" - Test both the confirming and cancelling. - Perform the same test with Manage -> Label templates. Sponsored-by: Athens County Public Libraries
Because labels seem to always have at least two ways to do the same thing, that fixes the delete button in the list of batches, but not the delete button in label-edit-batch.pl that you use (when you remember to use it) in the workflow "add items to batch, export batch to actually print, delete batch" all in the editor.
(In reply to Phil Ringnalda from comment #5) > not the delete button in label-edit-batch.pl Quite right, I didn't read the report carefully!
Created attachment 168179 [details] [review] Bug 37187: Fix deletion of label batches and label templates This patch uses the new form-submit JS to convert the label management deletion link from a GET operation to POST. To test, apply the patch and go to Cataloging -> Label creator. - Click Manage -> Label batches. Create a batch if necessary. - Click the "Delete" button in the "Actions" column. You should get a confirmation message, "Are you sure you want to delete this?" - Test both the confirming and cancelling. - Perform the same test with Manage -> Label templates. - From the Manage -> Label batches page, click "edit" on one of the batches. - Right above the "Items in batch number X" is a toolbar which should have a button, "Delete batch." Test that it works correctly to delete the batch. Sponsored-by: Athens County Public Libraries
Created attachment 168182 [details] [review] Bug 37187: Fix deletion of label batches and label templates This patch uses the new form-submit JS to convert the label management deletion link from a GET operation to POST. To test, apply the patch and go to Cataloging -> Label creator. - Click Manage -> Label batches. Create a batch if necessary. - Click the "Delete" button in the "Actions" column. You should get a confirmation message, "Are you sure you want to delete this?" - Test both the confirming and cancelling. - Perform the same test with Manage -> Label templates. - From the Manage -> Label batches page, click "edit" on one of the batches. - Right above the "Items in batch number X" is a toolbar which should have a button, "Delete batch." Test that it works correctly to delete the batch. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Created attachment 168226 [details] [review] Bug 37187: Fix deletion of label batches and label templates This patch uses the new form-submit JS to convert the label management deletion link from a GET operation to POST. To test, apply the patch and go to Cataloging -> Label creator. - Click Manage -> Label batches. Create a batch if necessary. - Click the "Delete" button in the "Actions" column. You should get a confirmation message, "Are you sure you want to delete this?" - Test both the confirming and cancelling. - Perform the same test with Manage -> Label templates. - From the Manage -> Label batches page, click "edit" on one of the batches. - Right above the "Items in batch number X" is a toolbar which should have a button, "Delete batch." Test that it works correctly to delete the batch. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ignoring a minor inconsistency that seems to be innocent: data-action="/cgi-bin/koha/labels/label-manage.pl" data-action="label-manage.pl"
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.02
Not for 23.11.x
No changes require to the manual - fixes something not working (no UI changes, so no screenshot updates required).