After 30718 ModItemTransfer leads to two calls on index_records. I bisected it down to 48bf9b1d91dbbc336f859ac1a83d7d25b0e6a3c1 but couldn't figure how that change is relevant. My gut feeling is that we were somehow hidding an error and the change to DateTime 'fixed' it. The code clearly yields to two calls to index_records as ->transit calls ModDateLastSeen without passing the skip_record_index flag. I added a follow-up on bug 30718 to fix the tests and expect we make a decision here. This bug could be replaced by bug 25754 as this needs a final refactoring removing it IMHO.
Created attachment 141866 [details] [review] Revert "Bug 30718: (follow-up) index_records is called more times than we thought" This reverts commit 35165e5f13ec11a62dea7f6b129f7f07c7ecb7f4.
Created attachment 141867 [details] [review] Bug 31437: (bug 30718 follow-up) Prevent useless indexation call from ModDateLastSeen Koha::Object->store is triggering an UPDATE because the datelastseen is different than the value in DB (comparing a datetime with a date)
Created attachment 141874 [details] [review] Revert "Bug 30718: (follow-up) index_records is called more times than we thought" This reverts commit 35165e5f13ec11a62dea7f6b129f7f07c7ecb7f4. https://bugs.koha-community.org/show_bug.cgi?id=31437 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 141875 [details] [review] Bug 31437: (bug 30718 follow-up) Prevent useless indexation call from ModDateLastSeen Koha::Object->store is triggering an UPDATE because the datelastseen is different than the value in DB (comparing a datetime with a date) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 22.11. Nice work everyone, thanks!