Bugzilla – Attachment 116641 Details for
Bug 27669
reverting and importing status never set when importing/reverting a batch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27669: Fix 'importing' and 'reverting' statuses when importing/reverting a batch
Bug-27669-Fix-importing-and-reverting-statuses-whe.patch (text/plain), 2.17 KB, created by
Jonathan Druart
on 2021-02-10 10:32:08 UTC
(
hide
)
Description:
Bug 27669: Fix 'importing' and 'reverting' statuses when importing/reverting a batch
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-10 10:32:08 UTC
Size:
2.17 KB
patch
obsolete
>From d7cdbb609e904d71e52b40e00d26127f017bafeb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 Feb 2021 11:30:45 +0100 >Subject: [PATCH] Bug 27669: Fix 'importing' and 'reverting' statuses when > importing/reverting a batch > >SetImportBatchStatus is not called with $batch_id > >It has been caught by bug 25026, and www/search_utf8.t fails with >t/db_dependent/www/search_utf8.t .. 14/87 Error POSTing http://koha:8081/cgi-bin/koha/tools/manage-marc-import.pl: Internal Server Error at t/db_dependent/www/search_utf8.t line 240. > >And, from logs: > >manage-marc-import.pl: C4::ImportBatch::SetImportBatchStatus(): DBI Exception: DBD::mysql::st execute failed: Truncated incorrect DOUBLE value: 'importing' [for Statement "UPDATE import_batches SET import_status = ? WHERE import_batch_id = ?" with ParamValues: 0=undef, 1='importing'] at /kohadevbox/koh >a/C4/ImportBatch.pm line 579: /kohadevbox/koha/tools/manage-marc-import.pl, referer: http://koha:8081/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=2 > >Test plan: >Read the changes and confirm it does make sense. >Import and revert a batch >--- > C4/ImportBatch.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 7064f94728..9095aec4b5 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -576,7 +576,7 @@ sub BatchCommitRecords { > my $num_items_errored = 0; > my $num_ignored = 0; > # commit (i.e., save, all records in the batch) >- SetImportBatchStatus('importing'); >+ SetImportBatchStatus($batch_id, 'importing'); > my $overlay_action = GetImportBatchOverlayAction($batch_id); > my $nomatch_action = GetImportBatchNoMatchAction($batch_id); > my $item_action = GetImportBatchItemAction($batch_id); >@@ -813,7 +813,7 @@ sub BatchRevertRecords { > my $num_ignored = 0; > my $num_items_deleted = 0; > # commit (i.e., save, all records in the batch) >- SetImportBatchStatus('reverting'); >+ SetImportBatchStatus($batch_id, 'reverting'); > my $overlay_action = GetImportBatchOverlayAction($batch_id); > my $nomatch_action = GetImportBatchNoMatchAction($batch_id); > my $dbh = C4::Context->dbh; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27669
: 116641