| Summary: | Fix wrong calls to ModZebra in AuthorityMarc | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
| Component: | MARC Authority data support | Assignee: | Marcel de Rooy <m.de.rooy> |
| Status: | CLOSED DUPLICATE | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | chris, m.de.rooy, nick |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 17908 | ||
| Attachments: |
Bug 17980: Fix wrong call to ModZebra in AddAuthority (affects Elastic Search users)
Bug 17980: Corresponding fix in DelAuthority Bug 17980: Corresponding fix in DelAuthority |
||
|
Description
Marcel de Rooy
2017-01-24 09:39:30 UTC
Created attachment 59490 [details] [review] Bug 17980: Fix wrong call to ModZebra in AddAuthority (affects Elastic Search users) The ModZebra call in AddAuthority incorrectly passes five parameters to ModZebra including $oldRecord. This makes the last parameter (the new record) being ignored !! A closer inspection of ModZebra reveals that this only affects installs using Elastic Search. The record parameter is ignored when you still use Zebra. Note: Keep in mind that AddAuthority is being used in adding as well as modifying authority records. This patch is part of a larger effort to make improvements in this area and will not be last one. Please help to get this further (see bug 17908). Trivial fix. Test plan: [1] If you use Elastic Search, verify that the new authority record is being indexed, not the old one. [2] If you do not use Elastic Search, add or modify an authority and search for this change in Authority (Search entire record). Chris or Nick: could one of you please confirm the Elastic Search side? Thanks. Actually, the Elastic Search problem is larger than this:
Look at ModZebra itself:
if ( $op eq 'specialUpdate' ) {
unless ($record) {
$record = GetMarcBiblio($biblionumber, 1);
}
my $records = [$record];
$indexer->update_index_background( [$biblionumber], [$record] );
}
This code is wrong in case you call ModZebra for an authority !
(In reply to Marcel de Rooy from comment #3) > Actually, the Elastic Search problem is larger than this: > Look at ModZebra itself: > if ( $op eq 'specialUpdate' ) { > unless ($record) { > $record = GetMarcBiblio($biblionumber, 1); > } > my $records = [$record]; > $indexer->update_index_background( [$biblionumber], [$record] ); > } > > This code is wrong in case you call ModZebra for an authority ! At least if you pass no record and call GetMarcBiblio :) Created attachment 59491 [details] [review] Bug 17980: Corresponding fix in DelAuthority The call to ModZebra here does not need more than three parameters. Same for Zebra and Elastic Search. Note: On omnibus bug 17908 a few more fixes are coming on this subject of deleting authorities. Test plan: [1] Delete an authority. [2] Search for it in the Authority module. Created attachment 59492 [details] [review] Bug 17980: Corresponding fix in DelAuthority The call to ModZebra here does not need more than three parameters. Same for Zebra and Elastic Search. Note: On omnibus bug 17908 a few more fixes are coming on this subject of deleting authorities. Test plan: [1] Delete an authority. [2] Search for it in the Authority module. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> |