[Koha-bugs] [Bug 31415] Script to automate converting holds to recalls

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 15 22:37:13 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #157002|0                           |1
        is obsolete|                            |

--- Comment #13 from David Nind <david at davidnind.com> ---
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 <david at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list