Bug 27669 - reverting and importing status never set when importing/reverting a batch
Summary: reverting and importing status never set when importing/reverting a batch
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-10 10:30 UTC by Jonathan Druart
Modified: 2022-06-06 20:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03


Attachments
Bug 27669: Fix 'importing' and 'reverting' statuses when importing/reverting a batch (2.17 KB, patch)
2021-02-10 10:32 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-02-10 10:30:34 UTC
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
Comment 1 Jonathan Druart 2021-02-10 10:32:08 UTC
Created attachment 116641 [details] [review]
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
Comment 2 Jonathan Druart 2021-02-10 10:35:12 UTC
It will also fix t/db_dependent/www/batch.t that is currently failing on My8 with the same error.
Comment 3 Jonathan Druart 2021-02-12 14:05:01 UTC
With bug 25026, this one is blocker.
Comment 4 Jonathan Druart 2021-02-12 14:41:02 UTC
Pushing it.
Comment 5 Jonathan Druart 2021-02-12 14:41:51 UTC
Patch pushed to master for 21.05.00
Comment 6 Fridolin Somers 2021-02-19 15:11:00 UTC
Pushed to 20.11.x for 20.11.03
Comment 7 Andrew Fuerste-Henry 2021-02-23 12:47:54 UTC
With this patch on 20.05, my batch import never completes. It just sits at 0% progress. I haven't found anything in the error logs. Not backporting.