https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415
David Nind <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157002|0 |1 is obsolete| | --- Comment #13 from David Nind <[email protected]> --- Created attachment 159016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159016&action=edit Bug 31415: Script to automate converting holds to recalls This patch adds a script which can be used to automatically convert the oldest hold on a record to a recall, if there are a specified minimum number of holds on the record. To test: 1) Enable UseRecalls and configure circulation rules relevant to recalls. Keep the 'on shelf recalls allowed' setting to 'any' for the sake of testing ('all' would require all items to be checked out for the hold to be converted to a recall) 2) Check out items from multiple records (at least 2 different records) to Patron A. 3) Place multiple holds on each record (at least 2 holds). 4) Place multiple holds on another record which has no items checked out. 5) We now have multiple records where the oldest hold is eligible for recall, plus a record where the oldest hold is NOT eligible for recall (because no items are checked out). 6) In your terminal, get into the shell and run the script. -v means verbose and will print the holds that are converted into recalls. --min 1 means there must be more than 1 hold on the record to be considered. sudo koha-shell INSTANCE perl misc/cronjobs/recalls/convert_holds_to_recalls.pl -v --min 1 7) Confirm that, for the records where items are checked out and there are multiple holds, the oldest hold was converted into a recall 8) Confirm that, for the record where no items are checked out, the holds all remain and not converted into a recall. 9) Confirm documentation for the script looks good perldoc misc/cronjobs/recalls/convert_holds_to_recalls.pl Sponsored-by: Auckland University of Technology Signed-off-by: David Nind <[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/
