[Bug 39772] New: Background Jobs page lists bogus job types for jobs implemented by plugins
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Bug ID: 39772 Summary: Background Jobs page lists bogus job types for jobs implemented by plugins Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tadeusz@sosnierz.com QA Contact: testopia@bugs.koha-community.org Currently the jobs page lists a job type of "Unknown job type 'plugin_*'" for all plugin-sourced jobs. While we don't currently have an institution of a human-readable job name, anything not looking like an error would be an improvement here. -- 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=39772 --- Comment #1 from HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> --- Created attachment 181648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181648&action=edit Bug 39772: Display package names for plugin jobs rather than "unknown" messages This slightly improves the current situation, where on background_jobs.pl each plugin job would be displayed as "Unknown job type 'plugin_...'". After this patch, we display the implementing package name (sourced from plugins' background_tasks()), which is slightly more human-friendly and significantly less error-looking. Test plan: 1. In KTD, install a plugin implementing background jobs (e.g. the KitchenSink) 2. On http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl, enable the plugin and run a tool/report from it 3. Observe ugly job types column on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl 4. Apply the patch 5. Observe the improved job types on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl -- 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=39772 --- Comment #2 from HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> --- Happy to discuss other possible improvements – perhaps job-specific metadata with human readable (and translatable?) names in them. This, however should be a relatively non-invasive and yet noticeable improvement. -- 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=39772 HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.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=39772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Assignee|koha-bugs@lists.koha-commun |tadeusz@sosnierz.com |ity.org | --- Comment #3 from David Nind <david@davidnind.com> --- Using the kitchen sink plugin (https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases) no longer seems to work for me: 1. Actions > Run report: Error 500 page 2. Actions > Run tool: 403 CSRF token error after "Click me" 3. Actions > Run admin tool: no background job I added an assignee. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to HKS3 Tadeusz Sośnierz from comment #2)
Happy to discuss other possible improvements – perhaps job-specific metadata with human readable (and translatable?) names in them. This, however should be a relatively non-invasive and yet noticeable improvement.
I think this is a good first step. Ideally, we should either add a new hook for plugins to provide descriptions for background job types (e.g. `background_tasks_descriptions`), or even change the `background_tasks` return data structure to include descriptions. In such scenario, what you do here would be the fallback for when the plugin doesn't provide descriptions. So move forward. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 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=39772 --- Comment #5 from HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> --- Created attachment 181712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181712&action=edit Bug 39772: Extend background_tasks API to allow for human-readable job names -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 --- Comment #6 from David Nind <david@davidnind.com> --- Any suggestions for another plugin to test this with? The kitchen sink plugin doesn't seem to work for me - see comment #3. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 --- Comment #7 from HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> --- https://github.com/HKS3/koha-normalize-marc2db is a good testcase. Its https://github.com/HKS3/koha-normalize-marc2db/tree/tadzik/custom-job-names branch utilizes the new API for customized job names too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 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=39772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181648|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 181853 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181853&action=edit Bug 39772: Display package names for plugin jobs rather than "unknown" messages This slightly improves the current situation, where on background_jobs.pl each plugin job would be displayed as "Unknown job type 'plugin_...'". After this patch, we display the implementing package name (sourced from plugins' background_tasks()), which is slightly more human-friendly and significantly less error-looking. Test plan: 1. In KTD, install a plugin implementing background jobs (e.g. the KitchenSink) 2. On http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl, enable the plugin and run a tool/report from it 3. Observe ugly job types column on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl 4. Apply the patch 5. Observe the improved job types on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl 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=39772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181712|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 181854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181854&action=edit Bug 39772: Extend background_tasks API to allow for human-readable job names 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=39772 --- Comment #10 from David Nind <david@davidnind.com> --- (In reply to HKS3 Tadeusz Sośnierz from comment #7)
https://github.com/HKS3/koha-normalize-marc2db is a good testcase. Its https://github.com/HKS3/koha-normalize-marc2db/tree/tadzik/custom-job-names branch utilizes the new API for customized job names too.
Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Background Jobs page lists |Background jobs page lists |bogus job types for jobs |unknown job types for jobs |implemented by plugins |implemented by plugins -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181853|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 181866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181866&action=edit Bug 39772: Display package names for plugin jobs rather than "unknown" messages This slightly improves the current situation, where on background_jobs.pl each plugin job would be displayed as "Unknown job type 'plugin_...'". After this patch, we display the implementing package name (sourced from plugins' background_tasks()), which is slightly more human-friendly and significantly less error-looking. Test plan: 1. In KTD, install a plugin implementing background jobs (e.g. the KitchenSink) 2. On http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl, enable the plugin and run a tool/report from it 3. Observe ugly job types column on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl 4. Apply the patch 5. Observe the improved job types on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181854|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 181867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181867&action=edit Bug 39772: Extend background_tasks API to allow for human-readable job names Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Nice improvement, no regressions, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com --- Comment #15 from Andrii Nugged <nugged@gmail.com> --- in: ``` for my $plugin (@plugins) { my $tasks = $plugin->background_tasks; ``` probably we should have: ``` for my $plugin (@plugins) { next unless $plugin->can('background_tasks'); my $tasks = $plugin->background_tasks; ``` if plugin does not have background_tasks method. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 --- Comment #16 from David Cook <dcook@prosentient.com.au> --- (In reply to Andrii Nugged from comment #15)
in:
``` for my $plugin (@plugins) { my $tasks = $plugin->background_tasks; ```
probably we should have:
``` for my $plugin (@plugins) { next unless $plugin->can('background_tasks'); my $tasks = $plugin->background_tasks; ```
if plugin does not have background_tasks method.
Strictly speaking, that shouldn't be necessary since only plugins that have registered a 'background_tasks' at install time will be in @plugins. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40033 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40033 [Bug 40033] The background jobs page calls GetPlugins incorrectly, resulting in a 500 error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 --- Comment #17 from David Cook <dcook@prosentient.com.au> --- It looks like this causes a regression. See bug 40033 for the fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 --- Comment #18 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #16)
(In reply to Andrii Nugged from comment #15)
in:
``` for my $plugin (@plugins) { my $tasks = $plugin->background_tasks; ```
probably we should have:
``` for my $plugin (@plugins) { next unless $plugin->can('background_tasks'); my $tasks = $plugin->background_tasks; ```
if plugin does not have background_tasks method.
Strictly speaking, that shouldn't be necessary since only plugins that have registered a 'background_tasks' at install time will be in @plugins.
That is, @plugins wasn't being properly populated. But Tad has fixed it in the other bug report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.05.00 |25.05.00,24.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesse@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #20 from Jesse Maseto <jesse@bywatersolutions.com> --- Will be pushed to 24.05.x for 24.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting Version(s)|25.05.00,24.11.06 |25.05.00,24.11.06,24.05.12 released in| | CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #21 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40547 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40547 [Bug 40547] Unable to view background job if enable_plugins is 0 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #22 from David Nind <david@davidnind.com> --- No changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org