From 929e906187eca4454604d6082da5d8abb8a5a8b5 Mon Sep 17 00:00:00 2001 From: Hinemoea Viault Date: Wed, 24 Jul 2024 12:35:28 -0400 Subject: [PATCH] Bug 37403: Wrong progress quantity in job details In fact the system adds a previous value to the progress. As if the system keeps a previous value and adds the correct count of records in addition. This patch removes the previously stored value. To test: 1. Go to Cataloging > Stage records for import 2. Choose a file with bibliographic records and click Upload file 3. In "Look for existing records in catalog?" choose a record matching rule (e.g. ISBN) 4. Click Stage for import 5. Click View detail of the enqueued job --> Progress show 2/1 6. Apply the patch 7. Repeat steps 1 to 4 8. Click View detail of the enqueued job --> Progress show 1/1 Signed-off-by: Roman Dolny qa script: Commit title does not start with 'Bug XXXXX: ' - d1bebb34d7 Signed-off-by: Chris Cormack Fixed patch subject line Signed-off-by: Katrin Fischer --- Koha/BackgroundJob/StageMARCForImport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/BackgroundJob/StageMARCForImport.pm b/Koha/BackgroundJob/StageMARCForImport.pm index 1272378279..e536ded50b 100644 --- a/Koha/BackgroundJob/StageMARCForImport.pm +++ b/Koha/BackgroundJob/StageMARCForImport.pm @@ -144,7 +144,7 @@ sub process { $matcher_code = $matcher->code(); $num_with_matches = BatchFindDuplicates( $batch_id, $matcher, 10, 50, - sub { my $job_progress = shift; $self->progress( $self->progress + $job_progress )->store } ); + sub { my $job_progress = shift; $self->progress( $job_progress )->store } ); SetImportBatchMatcher( $batch_id, $matcher_id ); SetImportBatchOverlayAction( $batch_id, $overlay_action ); SetImportBatchNoMatchAction( $batch_id, $nomatch_action ); -- 2.39.5