https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44347 --- Comment #1 from Andrii Nugged <nugged@gmail.com> --- Created attachment 212855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212855&action=edit Bug 44347: Explain active checkouts in the batch patron deletion report A patron can receive a checkout between selection and processing. The checkout foreign key prevents deletion, but the structured exception has no message for the job report to display. Translate the constraint on issues.borrowernumber to an explicit reason in this job's report. Cover both permanent deletion and moving to trash, including preservation of the patron and the checkout. Test plan: On a test instance, ask the administrator to hold the background worker when instructed. Use a list with one test patron without checkouts and a test item available for checkout. Before applying the patch: 1. Open Tools > Batch patron deletion and anonymization. 2. Select "Verify you want to delete patrons". 3. Choose the test patron list under "who are in patron list". 4. Click Next. 5. Select "Move these patrons to the trash". 6. With the worker held, click Finish. 7. Check out the test item to the patron. 8. Ask the administrator to resume the worker. 9. Open "Track the progress of this job" and wait for Finished. 10. Under Detailed messages, note the blank reason after "cannot be deleted:". Apply the patch. After applying the patch: 1. Repeat the steps with a fresh test patron and item. 2. Verify that the report says "Patron has active checkouts". 3. Verify that the patron still has the checkout. 4. Repeat using "Permanently delete these patrons". Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.