Koha::BackgroundJob::BatchDeleteItem - Background job derived class to process item deletion in batch
Return the job type 'batch_item_record_deletion'.
Koha::BackgroundJobs->find($id)->process( { record_ids => \@itemnumbers, deleted_biblios => 0|1, } );
Will delete all the items that have been passed for deletion.
When deleted_biblios is passed, if we deleted the last item of a biblio, the bibliographic record will be deleted as well.
The search engine's index will be updated according to the changes made to the deleted bibliographic recods.
The generated report will be: { deleted_itemnumbers => \@list_of_itemnumbers, not_deleted_itemnumbers => \@list_of_itemnumbers, deleted_biblionumbers=> \@list_of_biblionumbers, }
Koha::BackgroundJob::BatchDeleteItem->new->enqueue( { record_ids => \@itemnumbers, deleted_biblios => 0|1, } );
Enqueue the job.