[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
Mon Jan 9 16:44:50 CET 2023


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

Nick Clemens <nick at bywatersolutions.com> changed:

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

--- Comment #4 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 145150
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145150&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

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

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


More information about the Koha-bugs mailing list