Bug 26507: [20.05.x] Elasticsearch - Index records after storing new item
authorNick Clemens <nick@bywatersolutions.com>
Tue, 22 Sep 2020 14:14:55 +0000 (14:14 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 28 Sep 2020 17:44:13 +0000 (17:44 +0000)
commite8e87ca9b66273afc8896dfa5b1f918536db3b6a
tree97a5a388ce7cc9c155cefc0d2aa8a5a042e0de51
parent401133b5b167708c4942d46d0ed164a2ceefbdfa
Bug 26507: [20.05.x] Elasticsearch - Index records after storing new item

Currently Item->store indexes the record before the DB update - that is wrong

To test:
 1 - Find/create a bib with no items
 2 - add an item with barcode "abc123"
 3 - do a general keyword search for "abc123," see your bib is not in the results
 4 - perform a search that includes your bib in the results, confirm it shows as having no items
 5 - click through to bib details, confirm it shows your item here
 6 - edit and save your item
 7 - confirm barcode is now searchable
 8 - apply patches
 9 - Add a new item "cde456"
10 - Confirm it returns in searches
11 - Edit 'cde456' and change barcode to 'fgh789'
12 - Confirm the new abrcode is searchable

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Item.pm