Bug 33865

Summary: JS error when importing a staged MARC record file
Product: Koha Reporter: Owen Leonard <oleonard>
Component: MARC Bibliographic data supportAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.01,22.11.07
Circulation function:
Bug Depends on: 27421    
Bug Blocks:    
Attachments: Bug 33865: (bug 27421 follow-up) Remove leftover
Bug 33865: (bug 27421 follow-up) Remove leftover
Bug 33865: (bug 27421 follow-up) Remove leftover

Description Owen Leonard 2023-05-30 15:35:40 UTC
When you import a staged MARC record file it triggers a JS error in the console: 

"Uncaught ReferenceError: submitBackgroundJob is not defined"

It seems to be caused by the absence of the JS file background-job-progressbar.js, but the only outward problem seems to the error. Batches are being imported successfully.
Comment 1 Jonathan Druart 2023-06-01 06:33:35 UTC
Created attachment 151892 [details] [review]
Bug 33865: (bug 27421 follow-up) Remove leftover

Bug 27421 replaced the progress bar with job_progress.inc.
The code related to the old progress bar has not been removed however.

Moreover there was a JS error in the console:
"Uncaught ReferenceError: submitBackgroundJob is not defined"

Test plan:
Stage a MARC record for import
Import it
Revert the import
All should work correctly, without JS error in the console and with the
progress bar displayed nicely during the staging step.
Comment 2 Owen Leonard 2023-06-01 12:15:28 UTC
Created attachment 151914 [details] [review]
Bug 33865: (bug 27421 follow-up) Remove leftover

Bug 27421 replaced the progress bar with job_progress.inc.
The code related to the old progress bar has not been removed however.

Moreover there was a JS error in the console:
"Uncaught ReferenceError: submitBackgroundJob is not defined"

Test plan:
Stage a MARC record for import
Import it
Revert the import
All should work correctly, without JS error in the console and with the
progress bar displayed nicely during the staging step.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2023-06-01 14:12:24 UTC
Created attachment 151934 [details] [review]
Bug 33865: (bug 27421 follow-up) Remove leftover

Bug 27421 replaced the progress bar with job_progress.inc.
The code related to the old progress bar has not been removed however.

Moreover there was a JS error in the console:
"Uncaught ReferenceError: submitBackgroundJob is not defined"

Test plan:
Stage a MARC record for import
Import it
Revert the import
All should work correctly, without JS error in the console and with the
progress bar displayed nicely during the staging step.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-06-05 17:37:23 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Tomás Cohen Arazi (tcohen) 2023-06-09 14:08:17 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-06-12 09:27:03 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x