From a25feb05c9b07fe2b9535125756e9ffc2ca91214 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 Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- 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.39.5