[Koha-bugs] [Bug 35815] [Elasticsearch] Fix indexing of bibliographic records when items are deleted

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 16 03:34:49 CET 2024


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

--- Comment #1 from Aleisha Amohia <aleisha at catalyst.net.nz> ---
Created attachment 161052
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161052&action=edit
Bug 35815: Ensure ES biblio index is updated when items are batch deleted

This patch moves the Elasticsearch indexing outside of the transaction. This
ensures that bibliographic records are reindexed when items are batch deleted.

To test:

1. Spin up a Koha instance in your testing environment which uses Elasticsearch
2. Create a new bibliographic record and add three items to it
3. Do a search for your record that will return multiple results, so that you
are shown the search results. Confirm that the search results shows three items
are attached to the record.
4. Go to the record and select the checkbox for an item.
5. Click the link to Delete selected items. Confirm this again on the next
page.
6. Confirm the job is enqueued then completed. It should say your item has been
deleted.
7. Do a search for your record again so that you see it in the search results.
Notice the number of items has not been updated - it still says three --> BUG

8. Apply the patch and restart services

9. Go to the record (there will be two items now) and select the checkbox for
one item.
10. Click the link to Delete selected items. Confirm this again on the next
page.
11. Confirm the job is enqueued then completed. It should say your item has
been deleted.
12. Do a search for your record again so that you see it in the search results.
Confirm the number of items HAS been updated. It should now show one item
attached to the record.

Sponsored-by: Toi Ohomai Institute of Technology

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


More information about the Koha-bugs mailing list