Bugzilla – Attachment 110879 Details for
Bug 26507
New items not indexed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26507: [20.05.x] Elasticsearch - Index records after storing new item
Bug-26507-2005x-Elasticsearch---Index-records-afte.patch (text/plain), 2.29 KB, created by
Nick Clemens
on 2020-09-28 16:38:03 UTC
(
hide
)
Description:
Bug 26507: [20.05.x] Elasticsearch - Index records after storing new item
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2020-09-28 16:38:03 UTC
Size:
2.29 KB
patch
obsolete
>From 5372c30b7265b910865a0a15c10cf681ae61ff88 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 22 Sep 2020 14:14:55 +0000 >Subject: [PATCH] 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> >--- > Koha/Item.pm | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 9560a567cb..d02817b1f2 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -110,9 +110,6 @@ sub store { > $self->cn_sort($cn_sort); > } > >- C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) >- unless $params->{skip_modzebra_update}; >- > logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" ) > if $log_action && C4::Context->preference("CataloguingLog"); > >@@ -168,9 +165,6 @@ sub store { > $self->permanent_location( $self->location ); > } > >- C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) >- unless $params->{skip_modzebra_update}; >- > $self->_after_item_action_hooks({ action => 'modify' }); > > logaction( "CATALOGUING", "MODIFY", $self->itemnumber, "item " . Dumper($self->unblessed) ) >@@ -181,7 +175,11 @@ sub store { > $self->dateaccessioned($today); > } > >- return $self->SUPER::store; >+ my $result = $self->SUPER::store; >+ C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" ) >+ unless $params->{skip_modzebra_update}; >+ >+ return $result; > } > > =head3 delete >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26507
:
110558
|
110567
|
110620
| 110879