Bug 20535 - ModZebra called with $record with items stripped in ModBiblioMarc
Summary: ModZebra called with $record with items stripped in ModBiblioMarc
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P3 major (vote)
Assignee: David Gustafsson
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-06 09:13 UTC by David Gustafsson
Modified: 2019-04-30 12:28 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20535: ModZebra called with $record with items stripped (1.34 KB, patch)
2018-04-06 09:30 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 20535: ModZebra called with $record with items stripped (1.33 KB, patch)
2018-12-04 15:36 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 20535: ModZebra called with $record with items stripped (1.38 KB, patch)
2019-03-01 08:51 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 20535: ModZebra called with $record with items stripped (1.45 KB, patch)
2019-03-05 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Gustafsson 2018-04-06 09:13:09 UTC
The record that get passed to ModBiblioMarc will not have items embedded. Saving this through ModZebra will create an elastic document without items, and no items will be shown in search results for example. By removing the $record argument from the ModZebra call, ModZebra will reload the record with items embedded, which solves the problem.
Comment 1 David Gustafsson 2018-04-06 09:30:03 UTC
Created attachment 73755 [details] [review]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.
Comment 2 David Gustafsson 2018-12-04 15:36:54 UTC
Created attachment 82844 [details] [review]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.
Comment 3 David Gustafsson 2018-12-04 15:37:18 UTC
Rebased against master.
Comment 4 Josef Moravec 2019-03-01 08:51:41 UTC
Created attachment 85890 [details] [review]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Kyle M Hall 2019-03-05 14:43:18 UTC
Created attachment 86083 [details] [review]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Jonathan Druart 2019-03-05 15:35:58 UTC
Maybe we should remove this parameter from ModZebra? And improve ModZebra in that case, it calls GetMarcBiblio without testing $server.

(On a separate bug report of course)
Comment 7 Nick Clemens 2019-03-07 21:20:04 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-03-12 08:40:35 UTC
Pushed to 18.11.x for 18.11.04
Comment 9 Lucas Gass 2019-03-15 17:03:08 UTC
not backporting to 18.05.x