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
Any idea about this one? I think I saw something similar on the mailing list too.
Created attachment 148643 [details] [review] 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
Created attachment 150115 [details] [review] 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>
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-).
Created attachment 150118 [details] [review] 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>
Are we missing a 'success' message in the database update? (is the second output line manatory?)
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release