From 50e2f5c187c66d144b4da91e064423a010451fa7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 5 Aug 2022 11:49:51 +0200 Subject: [PATCH] Bug 27421: Fix job's size for import Signed-off-by: Nick Clemens --- Koha/BackgroundJob/MARCImportCommitBatch.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/BackgroundJob/MARCImportCommitBatch.pm b/Koha/BackgroundJob/MARCImportCommitBatch.pm index 3febc91b51..6cd5292023 100644 --- a/Koha/BackgroundJob/MARCImportCommitBatch.pm +++ b/Koha/BackgroundJob/MARCImportCommitBatch.pm @@ -20,6 +20,7 @@ use Try::Tiny; use base 'Koha::BackgroundJob'; +use Koha::Import::Records; use C4::ImportBatch qw( BatchCommitRecords ); @@ -64,6 +65,8 @@ sub process { my ( $num_added, $num_updated, $num_items_added, $num_items_replaced, $num_items_errored, $num_ignored ); try { + my $size = Koha::Import::Records->search({ import_batch_id => $import_batch_id })->count; + $self->size($size)->store; ( $num_added, $num_updated, $num_items_added, $num_items_replaced, $num_items_errored, $num_ignored -- 2.30.2