If a user deletes a Manage staged MARC records batch which is associated with imported records, they lose the ability to roll back the attached records. Sometimes this will be the intention, but other times they will simply have forgotten to revert a test import and those records are then impossible to roll-back. Could we have a warning message when deleting a batch with attached records such as "There are x imported records attached to this batch which cannot be reverted if you proceed. Do you wish to continue and delete the batch record?"
Created attachment 183872 [details] [review] Bug 38661: Add warning when deleting import batch When a batch is cleaned from the staged marc records screen, the user may be unaware of records that are imported within the batch which they may want to revert in future. Cleaning the batch unlinks these Test plan: 1. Stage a marc record from a mrc file 2. Import the batch 3. Return to the managed staged records screen. 4. Click "clean" 5. Note message is "Clear all reservoir records staged in this batch? This cannot be undone." 6. Apply patch and restart all. 7. Repeat steps 1-4 with a new batch 8. Note message has changed to "This batch contains imported records. Are you sure you wish to clear all the reservoir records? This cannot be undone."
Created attachment 183888 [details] [review] Bug 38661: Add warning when deleting import batch When a batch is cleaned from the staged marc records screen, the user may be unaware of records that are imported within the batch which they may want to revert in future. Cleaning the batch unlinks these and makes reversion / cleanup difficult. This patch gives an extra warning when cleaning a batch where there are still linked records attached. Test plan: 1. Stage a marc record from a mrc file 2. Import the batch 3. Return to the managed staged records screen. 4. Click "clean" 5. Note message is "Clear all reservoir records staged in this batch? This cannot be undone." 6. Apply patch and restart all. 7. Repeat steps 1-4 with a new batch 8. Note message has changed to "This batch contains imported records. Are you sure you wish to clear all the reservoir records? This cannot be undone." Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 183889 [details] [review] Bug 38661: (follow-up) Eliminate duplicate ids The id attribute should be unique on the page, so I'm changing it to a name attribute and updating the corresonding selector. Also, we can eliminate find() here: $(this).closest('form').find('input... ...because $(this) IS the form, so we can optimize a tiny bit by removing the find(). Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Should this be 'Passed QA'?
The changes here are minimal and everything looks good, keeping this as PQA even though it seems to lacking a proper QA. I'll consider it QA'ed by me. :) Please add release notes!
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x