[Bug 31245] New: Job detail view for batch mod explode if job not started
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Bug ID: 31245 Summary: Job detail view for batch mod explode if job not started Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org If the job has failed to start (status=new), the job detail view is exploding with Can't use an undefined value as an ARRAY reference at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateItem.pm line 175 Koha::BackgroundJob::BatchUpdateItem::additional_report('Koha::BackgroundJob::BatchUpdateItem=HASH(0x5592c6c6ced8)') called at /kohadevbox/koha/Koha/BackgroundJob.pm line 339 Koha::BackgroundJob::additional_report('Koha::BackgroundJob=HASH(0x5592c6df3268)') called at /kohadevbox/koha/admin/background_jobs.pl line 55 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31223 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138169&action=edit Bug 31245: Do not try to report results if task not started Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138170&action=edit [ALTERNATIVE-PATCH] Bug 31245: Do not call report for job detail view if job not started We should not generate the report if the job hasn't started yet Test plan: Stop the koha-worker processes, modify a new item using the batch mod tool, then see the detail page of the job Without this patch an error is generated: Can't use an undefined value as an ARRAY reference at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateItem.pm line 175 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|ASSIGNED |In Discussion --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- What about this alternative patch, Tomas? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #3)
What about this alternative patch, Tomas?
Why not both? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I felt like doing it your way, Jonathan, would place unnecessary constraints on what we want to display. Specially for plugins. We could want to display something on other background jobs in the 'new' status. But I think either solution is fine. If required we can step back later. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Tomás Cohen Arazi from comment #5)
I felt like doing it your way, Jonathan, would place unnecessary constraints on what we want to display. Specially for plugins. We could want to display something on other background jobs in the 'new' status.
^ This is a good point I hadn't thought of -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I don't understand your use case. "new": the job hasn't started yet. report: what happened, the job has started (still running or failed or succeeded). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #7)
I don't understand your use case. "new": the job hasn't started yet. report: what happened, the job has started (still running or failed or succeeded).
Ok, let's go ahead with your alternative patch. We can enhance it later if needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org --- Comment #9 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- Without these patches, I'm getting this same error on master when trying to view a job that's currently underway (status='started'). I'm on a sandbox, so I don't have a way to stop the koha-workers for testing. Here's how I've been testing: 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 will 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. try to view details of your job, get an error 6 - once the job has finished, click View again and see your job details successfully With these patches, I do not get an error. When I try to see the details for a job that's underway, the details page loads fine. It shows the status (started) and progress (122/961) correctly. However, it says "No items modified." This is inaccurate. If we can't load and list the items that have already been successfully modified, I'd rather the message say something like "This job is not yet complete." All that said, these patches do what they say and correct a messy error, so I'm signing off. Maybe that message can get changed in a followup. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138169|0 |1 is obsolete| | --- Comment #10 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 138550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138550&action=edit Bug 31245: Do not try to report results if task not started Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Andrew <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #11 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 138551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138551&action=edit Bug 31245: Do not call report for job detail view if job not started We should not generate the report if the job hasn't started yet Test plan: Stop the koha-worker processes, modify a new item using the batch mod tool, then see the detail page of the job Without this patch an error is generated: Can't use an undefined value as an ARRAY reference at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateItem.pm line 175 Signed-off-by: Andrew <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31290 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Upping severity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #138170|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138551|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 138968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138968&action=edit Bug 31245: Do not call report for job detail view if job not started We should not generate the report if the job hasn't started yet Test plan: Stop the koha-worker processes, modify a new item using the batch mod tool, then see the detail page of the job Without this patch an error is generated: Can't use an undefined value as an ARRAY reference at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateItem.pm line 175 Signed-off-by: Andrew <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138550|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 138969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138969&action=edit Bug 31245: Do not try to report results if task not started Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Andrew <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- So, it's belt and braces with both patches.. one to prevent explosion of we somehow call the method still and one to prevent calling the method in the first place. I'm happy here, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31336 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31336 [Bug 31336] In-progress background jobs give incorrect progress message -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- With bug 31336 it seems that we are still not doing things correctly. Shouldn't we display the detail only if status != new, started, running? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.06 released in| | CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #19 from Victor Grousset/tuxayo <victor@tuxayo.net> --- There isn't "View detail of the enqueued job" in 21.05.x so I bet it's not affected by it? Or is there another way to reach the view that blows up? (note 21.11.x backported it) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.06 |22.11.00,21.11, 22.05.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 --- Comment #20 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Thanks! Pushed to 21.11 for 21.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00,21.11, 22.05.06 |22.11.00,22.05.06,21.11.12 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nayema@mes.ac.in --- Comment #21 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- *** Bug 31290 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #22 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- *** Bug 31561 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31245 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32305 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org