[Bug 30982] New: Use the REST API for background job list view
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Bug ID: 30982 Summary: Use the REST API for background job list view Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement 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 We should implement and use a REST API route to retrieve the background job list. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30462 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30462 [Bug 30462] Should the background job list view hide index tasks by default? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 136245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136245&action=edit Bug 30982: REST API specs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 136246 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136246&action=edit Bug 30982: Use the REST API for background job list view -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|ASSIGNED |In Discussion --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Would that work for you, Martin? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136245|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136670&action=edit Bug 30982: REST API specs 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136246|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136671&action=edit Bug 30982: Use the REST API for background job list view 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=30982 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136672 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136672&action=edit Bug 30982: (QA follow-up) Double quoting and console.log This patch fixes the issues highlighted by the QA script; We use double quotes for translatable strings in JS and remove an errant console.log call. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is great, much cleaner! Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 136671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136671 Bug 30982: Use the REST API for background job list view Review of attachment 136671: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=30982&attachment=136671) ----------------------------------------------------------------- ::: Koha/REST/V1/BackgroundJobs.pm @@ +43,5 @@
+ my $background_jobs_set = + $can_manage_background_jobs + ? Koha::BackgroundJobs->new + : Koha::BackgroundJobs->search( + { borrowernumber => $patron->borrowernumber } );
This feels like it should be achievable with the 'allow_owner: true' swagger definition rather than needing special handling here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 136707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136707&action=edit Bug 30982: Add tests and implement GET /background_jobs/$id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 136708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136708&action=edit Bug 30982: Try allow-owner -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Martin, can you have a look at the last patch please? I've tried to implement your suggestion but either it does not work or I don't understand how it's supposed to work. I've added missing tests and implement the GET /background_jobs/$id route. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> ---
From IRC: @ashimema> ack.. looking at the code it's allow-owner that I've discussed before and bemoaned it's a bit of a mess. @ashimema> I'm thinking drop that last patch as you've proved it doesn't work right now.. and we can follow through on that stuff in another way..
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136708|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=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136715&action=edit Bug 30982: Make code more re-usable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 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=30982 --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Martin Renvoize from comment #13)
Created attachment 136715 [details] [review] Bug 30982: Make code more re-usable
Shouldn't you call search_limited instead of search then? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #14)
(In reply to Martin Renvoize from comment #13)
Created attachment 136715 [details] [review] [review] Bug 30982: Make code more re-usable
Shouldn't you call search_limited instead of search then?
We do so internally: https://git.koha-community.org/Koha-community/Koha/src/branch/master/Koha/RE... So $c->objects->search is calling a mojolicious helper method above.. as you can see it looks for the presence of a search_limited in the plural object and calls it in place of search if one is found. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I think this is pretty much ready to go.. just needs a QA eye.. which I can't lend as I SO'd :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Can you please update the patches with some descriptions and a test plan? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #18 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Those patches are simply using a new REST API routes to search and display the jobs. It make use of the DT wrapper to let the user search and filter the table, like we do in other places. There is nothing much I could add. Test plan: Add new jobs and filter the table (?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Applied the patches, restart_all: * The page loads ok, table is empty in my installation * I check the "Only include jobs started in the last hour" checkbox: Error: Something went wrong when loading the table. 500: Internal Server Error In my background_jobs table I have several entries, one for batch_item_record_modification and several update_elastic_index. All are finished. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #20 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138114 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138114&action=edit Bug 30982: Add 'context' to the REST API specs context has been added by bug 30889 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136670|0 |1 is obsolete| | --- Comment #21 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 139636 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139636&action=edit Bug 30982: REST API specs 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=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136671|0 |1 is obsolete| | --- Comment #22 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 139637 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139637&action=edit Bug 30982: Use the REST API for background job list view 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=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136672|0 |1 is obsolete| | --- Comment #23 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 139638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139638&action=edit Bug 30982: (QA follow-up) Double quoting and console.log This patch fixes the issues highlighted by the QA script; We use double quotes for translatable strings in JS and remove an errant console.log call. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136707|0 |1 is obsolete| | --- Comment #24 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 139639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139639&action=edit Bug 30982: Add tests and implement GET /background_jobs/$id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136715|0 |1 is obsolete| | --- Comment #25 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 139640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139640&action=edit Bug 30982: Make code more re-usable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138114|0 |1 is obsolete| | --- Comment #26 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 139641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139641&action=edit Bug 30982: Add 'context' to the REST API specs context has been added by bug 30889 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #27 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Rebased to fix conflict. Tests still pass. (t/db_dependent/api/v1/background_jobs.t) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #28 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Katrin Fischer from comment #19)
Applied the patches, restart_all:
* The page loads ok, table is empty in my installation * I check the "Only include jobs started in the last hour" checkbox: Error: Something went wrong when loading the table. 500: Internal Server Error
In my background_jobs table I have several entries, one for batch_item_record_modification and several update_elastic_index. All are finished.
I don't get the issue. Tested with empty db table and after checking in an item of a record on hold I get a Holds queue update and Update Elasticsearch index entry. (why is there an ES entry update?) The change here since your test doesn't look like to be able to fix that. And there were no changes on bug 30462. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #29 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Maybe another patch/bug changed things? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |joonas.kylmala@iki.fi --- Comment #30 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- The table filter "Type" doesn't work, if you select something else than the empty filter you get no results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #31 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Victor Grousset/tuxayo from comment #28)
(In reply to Katrin Fischer from comment #19)
Applied the patches, restart_all:
* The page loads ok, table is empty in my installation * I check the "Only include jobs started in the last hour" checkbox: Error: Something went wrong when loading the table. 500: Internal Server Error
In my background_jobs table I have several entries, one for batch_item_record_modification and several update_elastic_index. All are finished.
I don't get the issue. Tested with empty db table and after checking in an item of a record on hold I get a Holds queue update and Update Elasticsearch index entry.
(why is there an ES entry update?)
The change here since your test doesn't look like to be able to fix that. And there were no changes on bug 30462.
Unable to reproduce here as well, so maybe fixed in the dependency or there was some configuration issue in the setup katrin used, although if so, then I think we have a bug somewhere. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Failed QA |Signed Off Patch complexity|Medium patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139636|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=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139637|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=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139638|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=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139639|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=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139640|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=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139641|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=30982 --- Comment #32 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140488&action=edit Bug 30982: REST API specs 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=30982 --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140489 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140489&action=edit Bug 30982: Use the REST API for background job list view 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=30982 --- Comment #34 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140490&action=edit Bug 30982: (QA follow-up) Double quoting and console.log This patch fixes the issues highlighted by the QA script; We use double quotes for translatable strings in JS and remove an errant console.log call. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #35 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140491&action=edit Bug 30982: Add tests and implement GET /background_jobs/$id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #36 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140492&action=edit Bug 30982: Make code more re-usable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #37 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140493 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140493&action=edit Bug 30982: Add 'context' to the REST API specs context has been added by bug 30889 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #38 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140494&action=edit Bug 30982: Add Koha::BackgroundJobs->filter_by_current Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #39 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140495&action=edit Bug 30982: API tweaks This patch makes the following changes to the 'background_jobs' API: * We now call them 'jobs' * Removed deprecated query parameter definitions * Added only_current query parameter * Controller gets adapted to use $rs->filter_by_current when only_current is passed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #40 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140496&action=edit Bug 30982: (follow-up) Only escape asterisk chars when non-exact search Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #41 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140497 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140497&action=edit Bug 30982: Adapt table to new API spec Disclaimer: this patch is highly opinionated :-D When I started looking at this patch I felt like the two tables (current/past jobs) implemented on bug 30462 was the way to go. In order to make this patches apply after it I had to redo all the things. Or most of them. But I decided to keep the idea of filtering out completed tasks, not just having the option to display 'the last hour' tasks. For the task I added some required helper methods and the relevant tests as well. So a behavior change. Hope you all agree with it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #42 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 140498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140498&action=edit [OPTIONAL] Bug 30982: Rename 'Background Jobs' => 'Jobs' Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |lucas@bywatersolutions.com, | |nick@bywatersolutions.com --- Comment #43 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Please review ASAP for pushing it. Thanks everyone! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=30982 --- Comment #44 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Joonas Kylmälä from comment #30)
The table filter "Type" doesn't work, if you select something else than the empty filter you get no results.
Solved on 'Bug 30982: (follow-up) Only escape asterisk chars when non-exact search' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140488|0 |1 is obsolete| | --- Comment #45 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140589&action=edit Bug 30982: REST API specs 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140489|0 |1 is obsolete| | --- Comment #46 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140590&action=edit Bug 30982: Use the REST API for background job list view 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140490|0 |1 is obsolete| | --- Comment #47 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140591 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140591&action=edit Bug 30982: (QA follow-up) Double quoting and console.log This patch fixes the issues highlighted by the QA script; We use double quotes for translatable strings in JS and remove an errant console.log call. 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140491|0 |1 is obsolete| | --- Comment #48 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140592 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140592&action=edit Bug 30982: Add tests and implement GET /background_jobs/$id 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140492|0 |1 is obsolete| | --- Comment #49 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140593 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140593&action=edit Bug 30982: Make code more re-usable 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140493|0 |1 is obsolete| | --- Comment #50 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140594 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140594&action=edit Bug 30982: Add 'context' to the REST API specs context has been added by bug 30889 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140494|0 |1 is obsolete| | --- Comment #51 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140595 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140595&action=edit Bug 30982: Add Koha::BackgroundJobs->filter_by_current Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140495|0 |1 is obsolete| | --- Comment #52 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140596 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140596&action=edit Bug 30982: API tweaks This patch makes the following changes to the 'background_jobs' API: * We now call them 'jobs' * Removed deprecated query parameter definitions * Added only_current query parameter * Controller gets adapted to use $rs->filter_by_current when only_current is passed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140496|0 |1 is obsolete| | --- Comment #53 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140597&action=edit Bug 30982: (follow-up) Only escape asterisk chars when non-exact search Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140497|0 |1 is obsolete| | --- Comment #54 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140598&action=edit Bug 30982: Adapt table to new API spec Disclaimer: this patch is highly opinionated :-D When I started looking at this patch I felt like the two tables (current/past jobs) implemented on bug 30462 was the way to go. In order to make this patches apply after it I had to redo all the things. Or most of them. But I decided to keep the idea of filtering out completed tasks, not just having the option to display 'the last hour' tasks. For the task I added some required helper methods and the relevant tests as well. So a behavior change. Hope you all agree with it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=30982 --- Comment #55 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 140599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140599&action=edit Bug 30982: Rename 'Background Jobs' => 'Jobs' Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=30982 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140498|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=30982 --- Comment #56 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I really like the follow-ups here and think the end result is nicely polished in general. We could perhaps continue to refine UI was at a later stage after the staff client UI refresh.. things like the checkboxes for the set filter on the datatable feel slightly inconsistent/out of place and we do it inconsistently elsewhere too. I wonder if 'Pills' might be a nice generic approach.. I digress. As for the API, I think generally it's an improvement. I again wonder slightly about the quick filtering options tied to additional parameters, but so long as they're well documented on the spec I think they mostly make sense. It's an area I've contemplated a few times now and not come up with a nice solution for. Signing off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140597|0 |1 is obsolete| | --- Comment #57 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Comment on attachment 140597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140597 Bug 30982: (follow-up) Only escape asterisk chars when non-exact search Obsoleting patch as of bug 31565. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |31565 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31565 [Bug 31565] Patron search filter by category code with special character returns no results -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #58 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- If no one beats me, I will qa friday -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #59 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140789&action=edit Bug 30982: (QA follow-up) Resolve pod warning Empty section in previous paragraph at line 32 in file Koha/BackgroundJobs.pm Test plan: Run podchecker again on this module. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #60 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- My first impression for this patch Subject: [PATCH 10/11] Bug 30982: Rename 'Background Jobs' => 'Jobs' is: No. This does not make things clearer to me. What is Jobs. New positions within library staff? :) Just curious if I change opinion while going on. As a side note, only changing two templates for this will not make it easier to switch terminology. Example: [% IF CAN_user_parameters_manage_background_jobs %] - <h3>Background jobs</h3> + <h3>Jobs</h3> We will be constantly thinking jobs or background_jobs while editing code.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #61 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Resuming later on -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #62 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Working here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #63 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- No blocker, not fixing it here: const job_statuses = [ {'_id': 'new', '_str': _("New")}, {'_id': 'cancelled', '_str': _("Cancelled")}, {'_id': 'finished', '_str': _("Finished")}, {'_id': 'started', '_str': _("Started")}, {'_id': 'running', '_str': _("Running")}, {'_id': 'failed', '_str': _("Failed")}, We have status running and started. Probably an error. The status 'running' may probably be coming from C4::BackgroundJob.pm $self->{'status'} = "running"; It seems that Koha::BackgroundJob does not use 'running'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #64 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> ---
Disclaimer: this patch is highly opinionated :-D
I personally think that that is highly exaggerated :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140589|0 |1 is obsolete| | --- Comment #65 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140884&action=edit Bug 30982: REST API specs Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140590|0 |1 is obsolete| | --- Comment #66 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140885&action=edit Bug 30982: Use the REST API for background job list view Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140591|0 |1 is obsolete| | --- Comment #67 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140886&action=edit Bug 30982: (QA follow-up) Double quoting and console.log This patch fixes the issues highlighted by the QA script; We use double quotes for translatable strings in JS and remove an errant console.log call. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140592|0 |1 is obsolete| | --- Comment #68 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140887&action=edit Bug 30982: Add tests and implement GET /background_jobs/$id Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140593|0 |1 is obsolete| | --- Comment #69 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140888&action=edit Bug 30982: Make code more re-usable Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140594|0 |1 is obsolete| | --- Comment #70 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140889&action=edit Bug 30982: Add 'context' to the REST API specs context has been added by bug 30889 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140595|0 |1 is obsolete| | --- Comment #71 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140890 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140890&action=edit Bug 30982: Add Koha::BackgroundJobs->filter_by_current Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140596|0 |1 is obsolete| | --- Comment #72 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140891&action=edit Bug 30982: API tweaks This patch makes the following changes to the 'background_jobs' API: * We now call them 'jobs' * Removed deprecated query parameter definitions * Added only_current query parameter * Controller gets adapted to use $rs->filter_by_current when only_current is passed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140598|0 |1 is obsolete| | --- Comment #73 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140892 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140892&action=edit Bug 30982: Adapt table to new API spec Disclaimer: this patch is highly opinionated :-D When I started looking at this patch I felt like the two tables (current/past jobs) implemented on bug 30462 was the way to go. In order to make this patches apply after it I had to redo all the things. Or most of them. But I decided to keep the idea of filtering out completed tasks, not just having the option to display 'the last hour' tasks. For the task I added some required helper methods and the relevant tests as well. So a behavior change. Hope you all agree with it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140599|0 |1 is obsolete| | --- Comment #74 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140893 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140893&action=edit Bug 30982: Rename 'Background Jobs' => 'Jobs' Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140789|0 |1 is obsolete| | --- Comment #75 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140894 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140894&action=edit Bug 30982: (QA follow-up) Resolve pod warning Empty section in previous paragraph at line 32 in file Koha/BackgroundJobs.pm Test plan: Run podchecker again on this module. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #76 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140895 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140895&action=edit Bug 30982: (QA follow-up) Spelling [1] Correct: BackgrounJob [2] If should filter out not current jobs => Had a hard time reading that one until I replaced if by it. => Decided to rephrase it in a more positive way. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #77 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140896 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140896&action=edit Bug 30982: (QA follow-up) Remove redundancy from template The template now contains two lists for both status and type: a TT list and a JS list. The type list already proves that redundancy leads to bugs. We miss three types at one side: Unknown job type 'stage_marc_for_import' Unknown job type 'marc_import_commit_batch' Unknown job type 'marc_import_revert_batch' This patch removes the TT list. And gets the status and type via an additional js call. For that reason I hide the fieldset until document ready. This can be improved later when needed. Test plan: Look at status and type on both job list and detail view. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #78 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140897&action=edit Bug 30982: (QA follow-up) No userenv, no jobs + # Assume permission if context has no user + my $can_manage_background_jobs = 1; => This felt a bit unsafe. Test plan: Try interface for jobs. Call API with cookie. Call API with OAuth. Run t/db_dependent/Koha/BackgroundJobs.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #79 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Passing QA but with some further comments that imo need to be addressed at some point. [1] The switch Jobs / Background jobs is still a bit arguable for me, especially since we create another patron/borrower/member thing in the codebase. [2] Just want to note that this patch set did not contain any test plans. Although it is REST API, we should just add test plans. [3] A superlibrarian of one with can_manage may see the jobs of other users, no problem, but the interface should show the job owner. It is confusing now since I do not see if it is my job. (The feature was apparently developed with showing only your own jobs in mind.) [4] The default setting for Current jobs only and Started last hour is arguable. With the current setting I never see a job, since they just finished. I tend to say that Current jobs only should be off at the start. Great work for the rest ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #80 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- s/of one/or one/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 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=30982 --- Comment #81 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=30982 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31666 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31666 [Bug 31666] Add job progress bar to stage-marc-import.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #82 from Nick Clemens <nick@bywatersolutions.com> --- This is wonderful. While I know it is an enhancement, the presence of elastic indexing and holds queue updates in the jobs table can lead to large tables quickly. I would request this one be considered for backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #83 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Nick Clemens from comment #82)
This is wonderful.
While I know it is an enhancement, the presence of elastic indexing and holds queue updates in the jobs table can lead to large tables quickly. I would request this one be considered for backport
I would be happy to add this patchset to 22.05.x but there are conflicts with this patchset in 22.05.x that I do not feel comfortable solving. Could you rebase? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Bug 30982 depends on bug 30462, which changed state. Bug 30462 Summary: Should the background job list view hide index tasks by default? https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30462 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #84 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 142859 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142859&action=edit Bug 30982: [22.05.x] Use the REST API for background job list view Bug 30982: REST API specs Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: (QA follow-up) Double quoting and console.log This patch fixes the issues highlighted by the QA script; We use double quotes for translatable strings in JS and remove an errant console.log call. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: Add tests and implement GET /background_jobs/$id Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: Make code more re-usable Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: Add 'context' to the REST API specs context has been added by bug 30889 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: Add Koha::BackgroundJobs->filter_by_current Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: API tweaks This patch makes the following changes to the 'background_jobs' API: * We now call them 'jobs' * Removed deprecated query parameter definitions * Added only_current query parameter * Controller gets adapted to use $rs->filter_by_current when only_current is passed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: Adapt table to new API spec Disclaimer: this patch is highly opinionated :-D When I started looking at this patch I felt like the two tables (current/past jobs) implemented on bug 30462 was the way to go. In order to make this patches apply after it I had to redo all the things. Or most of them. But I decided to keep the idea of filtering out completed tasks, not just having the option to display 'the last hour' tasks. For the task I added some required helper methods and the relevant tests as well. So a behavior change. Hope you all agree with it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: Rename 'Background Jobs' => 'Jobs' Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: (QA follow-up) Resolve pod warning Empty section in previous paragraph at line 32 in file Koha/BackgroundJobs.pm Test plan: Run podchecker again on this module. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: (QA follow-up) Spelling [1] Correct: BackgrounJob [2] If should filter out not current jobs => Had a hard time reading that one until I replaced if by it. => Decided to rephrase it in a more positive way. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: (QA follow-up) Remove redundancy from template The template now contains two lists for both status and type: a TT list and a JS list. The type list already proves that redundancy leads to bugs. We miss three types at one side: Unknown job type 'stage_marc_for_import' Unknown job type 'marc_import_commit_batch' Unknown job type 'marc_import_revert_batch' This patch removes the TT list. And gets the status and type via an additional js call. For that reason I hide the fieldset until document ready. This can be improved later when needed. Test plan: Look at status and type on both job list and detail view. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Bug 30982: (QA follow-up) No userenv, no jobs + # Assume permission if context has no user + my $can_manage_background_jobs = 1; => This felt a bit unsafe. Test plan: Try interface for jobs. Call API with cookie. Call API with OAuth. Run t/db_dependent/Koha/BackgroundJobs.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | Status|Pushed to master |Pushed to stable --- Comment #85 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.07 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Bug 30982 depends on bug 31565, which changed state. Bug 31565 Summary: Patron search filter by category code with special character returns no results https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31565 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Bug 30982 depends on bug 31565, which changed state. Bug 31565 Summary: Patron search filter by category code with special character returns no results https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31565 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |arthur.suzuki@biblibre.com --- Comment #86 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- unmet dependencies, can't apply on 21.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #87 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- + is( Koha::BackgroundJobs->search_limited->count, 0, 'No jobs found without userenv' ); This is wrong if jobs exist. Jenkins is failing because of this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 --- Comment #88 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I don't recreate locally. I've run the different tests that (directly) insert background jobs, there are some leftover in the DB, but the tests are still passing. 21:28:55 koha_1 | # Failed test 'No jobs found without userenv' 21:28:55 koha_1 | # at t/db_dependent/Koha/BackgroundJobs.t line 135. 21:28:55 koha_1 | # got: '2' 21:28:55 koha_1 | # expected: '0' 21:28:55 koha_1 | # Looks like you failed 1 test of 3. 21:28:55 koha_1 | 21:28:55 koha_1 | # Failed test 'search_limited' 21:32:22 koha_1 | # at t/db_dependent/Koha/BackgroundJobs.t line 142. 21:32:22 koha_1 | # Looks like you failed 1 test of 15. 21:32:22 koha_1 | [20:28:55] t/db_dependent/Koha/BackgroundJobs.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32304 --- Comment #89 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #88)
I don't recreate locally. I've run the different tests that (directly) insert background jobs, there are some leftover in the DB, but the tests are still passing.
21:28:55 koha_1 | # Failed test 'No jobs found without userenv' 21:28:55 koha_1 | # at t/db_dependent/Koha/BackgroundJobs.t line 135. 21:28:55 koha_1 | # got: '2' 21:28:55 koha_1 | # expected: '0' 21:28:55 koha_1 | # Looks like you failed 1 test of 3. 21:28:55 koha_1 | 21:28:55 koha_1 | # Failed test 'search_limited' 21:32:22 koha_1 | # at t/db_dependent/Koha/BackgroundJobs.t line 142. 21:32:22 koha_1 | # Looks like you failed 1 test of 15. 21:32:22 koha_1 | [20:28:55] t/db_dependent/Koha/BackgroundJobs.t
See bug 32304. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32304 [Bug 32304] Subtest purge in BackgroundJobs.t fails when having older jobs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|32304 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32304 [Bug 32304] Subtest purge in BackgroundJobs.t fails when having older jobs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Bug 30982 depends on bug 31565, which changed state. Bug 31565 Summary: Patron search filter by category code with special character returns no results https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31565 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31090 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32580 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32580 [Bug 32580] Background job cancel button broken, leads to bakcground_jobs.pl with a kc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30982 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32596 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32596 [Bug 32596] Background jobs viewer not showing finished jobs -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org