Batch progress bar does not check for 0 size jobs, and divides by 0, with unpredictable effects. Also, putting progress bar javascript inline makes it impossible to debug. It is possible that this change will improve situation with some bugs reported against background jobs that use progress bar.
Created attachment 4183 [details] [review] p
Created attachment 7607 [details] [review] patch Not sure why it did not apply. Rebased without any problems.
Created attachment 8144 [details] [review] bug 6372: moved background-job.inc to background-job-progressbar.js Check for div 0 when calculating percentage. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> The batch item modification tool now handles zero-size batches properly, and staging MARC records still works.
Scanning for remaining instances of [% INCLUDE 'background-job.inc' %], I found one left in: koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt
Created attachment 8549 [details] [review] patch Yes, that came in after the patch with Bug 1633
Created attachment 9076 [details] [review] bug 6372: moved background-job.inc to background-job-progressbar.js Check for div 0 when calculating percentage Signed-off-by: Liz Rea <wizzyrea@gmail.com> div0 no longer appears on 0 size jobs. Passes t xt
QA comment: - Move background job javascript code into a js file. - Delete useless routine progress_callback (batchmod.pl) - Fix the specific case where there is no job to process Marked as Passed QA
Patch pushed. I've tested that Koha still works with files that are not of size 0 Note that it's hard to spot the div by 0 in the midlde of the move to .js. Both are perfect things, but it would have been better to do 2 patches