From c03fc5e15150b52ba5e6bd33e6694959bd6b7860 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 Content-Type: text/plain; charset=utf-8 Signed-off-by: Nick Clemens Signed-off-by: Marcel de Rooy --- 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.20.1