[Koha-bugs] [Bug 32013] Autorenewals is effectively a bulk action and should be treated as such

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 6 11:58:02 CET 2022


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

--- Comment #2 from Matt Blenkinsop <matt.blenkinsop at ptfs-europe.com> ---
Created attachment 144442
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144442&action=edit
Bug 32013: Autorenewal batch indexing

The automatic_renewals.pl cron script currently loops through items for
automatic renewal and calls the indexer for each one individually.
skip_record_index has now been added as a parameter to the AddRenewal function
to skip the indexing process. The item numbers are now added to an array and
then the indexer is called once from within automatic_renewals.pl and passed
the array to queue one indexing job instead of multiple jobs.

Test plan:
1) AddRenewal uses Koha::Items->store() to trigger the indexing process. Run
prove -vv t/db_dependent/Koha/SearchEngine/Indexer.t and check tests 5,6,29,30.
These tests prove whether passing skip_record_index to store() triggers or
skips the indexing process. All four tests should pass to show that
skip_index_records can prevent the indexing being triggered.
2) Add multiple renewals that are able to be autorenewed and run the
automatic_renewals.pl script. There should be multiple items queued in
zebraqueue.
3) Apply patch and try again
4) There should now only be one job queued in zebraqueue

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


More information about the Koha-bugs mailing list