[Bug 32745] New: Background jobs view breaks when there are jobs with context IS NULL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Bug ID: 32745 Summary: Background jobs view breaks when there are jobs with context IS NULL Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com In 22.11.01 the background jobs view breaks, when there are entries with context = NULL in the database. In our case these are old entries for "batch_biblio_record_modification" from 2021. Newer entries seem to always have context set. Maybe an update issue with old data? * Manipulate database * Go to Administration > Manage jobs * Uncheck both checkboxes on top of the list if necessary -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |nick@bywatersolutions.com --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Any idea about this one? I think I saw something similar on the mailing list too. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 148643 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148643&action=edit Bug 32745: Adjust context for invalid background jobs We had some problems recently and it's possible to have background_jobs.context=NULL But the REST API specs is expecting an object. We could either modify the specs, or adjust the incorrect entries in DB, which is IMO better. Test plan: 0. Don't apply the patch 1. Create some background jobs 2. Set context to NULL UPDATE background_jobs SET context=NULL; 3. List the jobs and note the datatable error, and the error in Koha log OpenAPI >>> GET api/v1/jobs [{"message":"Expected object - got null.","path":"\/body\/0\/context"},{"message":"Expected object - got null.","path":"\/body\/1\/context"}] 4. Apply the patch 5. Run `updatedatabase` 6. Confirm that the list and detail view are not working correctly -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Cindy Murdock Ames <cmurdock@ccfls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cmurdock@ccfls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 David Nind <david@davidnind.com> 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=32745 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148643|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 150115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150115&action=edit Bug 32745: Adjust context for invalid background jobs We had some problems recently and it's possible to have background_jobs.context=NULL But the REST API specs is expecting an object. We could either modify the specs, or adjust the incorrect entries in DB, which is IMO better. Test plan: 0. Don't apply the patch 1. Create some background jobs 2. Set context to NULL UPDATE background_jobs SET context=NULL; 3. List the jobs and note the datatable error, and the error in Koha log OpenAPI >>> GET api/v1/jobs [{"message":"Expected object - got null.","path":"\/body\/0\/context"},{"message":"Expected object - got null.","path":"\/body\/1\/context"}] 4. Apply the patch 5. Run `updatedatabase` 6. Confirm that the list and detail view are not working correctly Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. To create some background jobs, I started KTD with --es7 then updated the titles for 3 records. 2. For step 6 of the test plan, I think that should say the list and detail views ARE working correctly 8-). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Background jobs view breaks |Jobs view breaks when there |when there are jobs with |are jobs with context IS |context IS NULL |NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA 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=32745 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150115|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 150118 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150118&action=edit Bug 32745: Adjust context for invalid background jobs We had some problems recently and it's possible to have background_jobs.context=NULL But the REST API specs is expecting an object. We could either modify the specs, or adjust the incorrect entries in DB, which is IMO better. Test plan: 0. Don't apply the patch 1. Create some background jobs 2. Set context to NULL UPDATE background_jobs SET context=NULL; 3. List the jobs and note the datatable error, and the error in Koha log OpenAPI >>> GET api/v1/jobs [{"message":"Expected object - got null.","path":"\/body\/0\/context"},{"message":"Expected object - got null.","path":"\/body\/1\/context"}] 4. Apply the patch 5. Run `updatedatabase` 6. Confirm that the list and detail view are not working correctly Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Are we missing a 'success' message in the database update? (is the second output line manatory?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32745 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.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=32745 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. 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=32745 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.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=32745 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org