If one loads the background job details page (background_jobs.pl) for a job that has started but not yet completed, Koha shows a message of "No items modified." We should give an accurate message along the lines of "This job is still in progress." A completed job lists all of the modified items/bibs/whatever. I'm ambivalent about whether or not we need to list the already-modified records when loading this page for an incomplete job. To recreate: 1 - write a report, SELECT itemnumber FROM items. With the default dev data, that's 961 items. 2 - use your report to send all of those to batch mod. The page will take a while to load 3 - while your batch mod page is loading, open background_jobs.pl in another tab and have it ready to go 4 - modify something in all 961 records -- add a public note or something -- once you submit this job it should take about 45 seconds to complete 5 - BEFORE THE JOB IS DONE - reload background_jobs.pl, see your job is listed and shows status=started. click to the details view for your job, see it shows a message of "No items modified."
Also true for deletion "All records have been deleted successfully!”
I rise to major importance, this could lead to misunderstanding. I see in template : [% IF job.status != 'new' %][% PROCESS 'report' %][% END %] https://git.koha-community.org/Koha-community/Koha/src/commit/9c565eff1357c2fdf900f006a17fa62fd4f2f9ee/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt#L99 Should we simply change for job.status finished, canceled or failed ? Also : I see some templates are managing the cancel status : https://git.koha-community.org/Koha-community/Koha/src/commit/00e33f875808761e6a280778842fd28bd5ab27d9/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_biblio_record_modification.inc#L24 It is missing in batch biblio record deletion. Maybe we should change includes to define "report_sucess", "report_canceled" ...
Ah also I see the template uses : [% SET report = job.report %] [% IF report %] But job.report returns empty hashref : https://git.koha-community.org/Koha-community/Koha/src/commit/2eca0fe3632bf0ec4396da0c694b9fdbddf9e4df/Koha/BackgroundJob.pm#L339 May we return undef ?