https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32560
Sam Lau <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147814|0 |1 is obsolete| | --- Comment #14 from Sam Lau <[email protected]> --- Created attachment 154224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154224&action=edit Bug 32560: (follow-up) Replace raw SQL queries with Koha::Patrons search and update Also: - Add use Koha::Script -cron; - Add license - Add optional verbose flag - Add cronjob logging Test plan: 1. Set 'CronjobLog' syspref = 'Log' 2. Edit a borrower to have an expiration date in the past - also make sure they have 'Lost card' set to 'No' 3. Run the set_expired_lost.pl script: sudo koha-shell <instance> cd misc/cronjobs ./set_expired_lost.pl 4. Observe no output is displayed but viewing the borrower account from step #1 they now have a 'Lost card' value of 'Yes'. 5. Change the borrower account 'Lost card' back to 'No' 6. Run the set_expired_lost.pl script again, this time with the verbose flag: sudo koha-shell <instance> cd misc/cronjobs ./set_expired_lost.pl -v 7. Observe output is displayed to the commandline showing the number of borrowers that have been changed. Check the borrower account again and notice the 'Lost card' has been set back to 'Yes'. 8. Repeat step #6 and observe no output is printed to the terminal - this is because all expired borrowers have already been marked as lost. 9. Check there are log entries for set_expired_lost.pl cronjob in the action_logs table: sudo koha-mysql <instance> select * from action_logs where script='set_expired_lost.pl'; Sponsored-by: Dalton McCaughey Library, Australia Signed-off-by: Sam Lau <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
