]> git.koha-community.org Git - koha.git/commit
Bug 33739: Only trigger indexing on last item modification at ModItemTransfer
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 15 May 2023 15:07:09 +0000 (12:07 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 May 2023 09:26:06 +0000 (11:26 +0200)
commit25f8581c0d98706047d282e46122821be738d969
tree14e845c13c0870d05012c8293f8f3ec7e56ded18
parent434a73b0e6f57b06370e56ccdc7999a6d7d951db
Bug 33739: Only trigger indexing on last item modification at ModItemTransfer

This patch makes ModItemTransfer trigger record indexing only on the
last call (in $transfer->transit). And extra parameter is added to
->transit to effectively honour the ModItemTransfer parameter.

I wanted to mention that bug 31212 highlighted an existing issue, not
catched by the current tests before its inclussion, because of the DT truncation
taking place.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/SearchEngine/Indexer.t
=> FAIL: Indexing is requested twice, should only be once
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! Indexing is requested only once!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Items.pm
Koha/Item/Transfer.pm