Description
Jonathan Druart
2022-04-06 12:04:15 UTC
Created attachment 132992 [details] [review] Bug 30467: Don't send the delete request for each item We are sending the request when all the items have been deleted. Created attachment 134398 [details] [review] Bug 30467: Don't send the delete request for each item We are sending the request when all the items have been deleted. Created attachment 134640 [details] [review] Bug 30467: Don't send the delete request for each item We are sending the request when all the items have been deleted. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Yup, confirmed... All works and this prevents a double indexing process. Passing QA Sorry does not work for me. In Koha::BackgroundJob::BatchDeleteItem : I see there is indexing for deleted biblio records : if (@deleted_biblionumbers) { my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); $indexer->index_records( \@deleted_biblionumbers, 'recordDelete', "biblioserver", undef ); } But I see not indexing for deleted items. I see batch items update uses Koha::Items->batch_update() with : if (@modified_itemnumbers) { my @biblionumbers = uniq( Koha::Items->search( { itemnumber => \@modified_itemnumbers } ) ->get_column('biblionumber')); if ( @biblionumbers ) { my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); $indexer->update_index( \@biblionumbers ); } } Should we also create Koha::Items->batch_delete() ? Maybe in another bug report. Item updates result in biblio re-indexes and these item deletes are all attached to the biblio's we're deleting.. so the re-index is caught by the biblio re-index call you spotted. Or am I missing something more involved? Created attachment 134672 [details] [review] Bug 30467: (QA follow-up) Restore indexing for item only deletion This patch restores indexing for item only bulk deletions. I was totally missing something, good catch. Follow-up attached, but I'd love to get a QA stamp from someone to check my work on it Created attachment 134675 [details] [review] Bug 30467: (QA follow-up) Restore indexing for item only deletion This patch restores indexing for item only bulk deletions. JD amended patch: * remove trailing whitespaces * Move if inside first condition Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 134741 [details] [review] Bug 30467: (QA follow-up) Fix copy paste error to update updated_biblionumbers Created attachment 134744 [details] [review] Bug 30467: (QA follow-up) Fix copy paste error to update updated_biblionumbers Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works perfect, thanks for your fast and great work Pushed to master for 22.05, thanks to everybody involved [U+1F984] |