[Koha-bugs] [Bug 30467] BatchDeleteItem task does not deal with indexation correctly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 5 22:46:35 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30467

Fridolin Somers <fridolin.somers at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Failed QA
                 CC|                            |fridolin.somers at biblibre.co
                   |                            |m

--- Comment #5 from Fridolin Somers <fridolin.somers at biblibre.com> ---
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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list