https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43234
--- Comment #4 from David Nind <[email protected]> --- Created attachment 203380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203380&action=edit Bug 43234: (follow-up) Refactor cleanup_database.pl to use filter_by_purgeable This patch refactors the ILL request purging in cleanup_database.pl to use the new Koha::ILL::Requests->filter_by_purgeable method instead of the raw SQL PurgeIllRequests subroutine. Changes: - Replace PurgeIllRequests() call with filter_by_purgeable + count/delete - Remove the PurgeIllRequests subroutine (raw SQL) - Add use Koha::ILL::Requests import The behavior is identical: dry-run reports count, --confirm deletes. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ perl misc/cronjobs/cleanup_database.pl --illrequests-days 30 \ --illrequests-status COMP -v => SUCCESS: Reports count of requests that would be removed 3. Run with --confirm: k$ perl misc/cronjobs/cleanup_database.pl --illrequests-days 30 \ --illrequests-status COMP --confirm -v => SUCCESS: Requests are deleted, count reported 4. Run unit tests: k$ prove t/db_dependent/Koha/ILL/Requests.t => SUCCESS: Tests pass 5. Sign off :-D Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
