Koha-clms/api/v1/swagger/paths
Jonathan Druart eb2dfad0d1 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>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-11-01 21:40:18 +00:00
..
acquisitions_baskets.yaml Bug 30536: (QA follow-up) POD + Spec Consistency 2022-05-03 11:19:51 -10:00
acquisitions_funds.yaml Bug 30536: Update spec files 2022-05-03 11:19:51 -10:00
acquisitions_orders.yaml Bug 30536: Update spec files 2022-05-03 11:19:51 -10:00
acquisitions_vendors.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
advancededitormacros.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
article_requests.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
biblios.yaml Bug 30536: Update spec files 2022-05-03 11:19:51 -10:00
cash_registers.yaml Bug 30536: Update spec files 2022-05-03 11:19:51 -10:00
checkouts.yaml Bug 30536: Update spec files 2022-05-03 11:19:51 -10:00
circulation-rules.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
cities.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
clubs.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
config_smtp_servers.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
holds.yaml Bug 30780: Librarians with only "place_holds" permissions can not update holds data via REST API 2022-07-13 19:39:25 +00:00
ill_backends.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
illrequests.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
import_batch_profiles.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
import_batches.yaml Bug 30855: Rename /import => /import_batches 2022-06-10 16:48:16 +00:00
items.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
jobs.yaml Bug 30982: [22.05.x] Use the REST API for background job list view 2022-11-01 21:40:18 +00:00
libraries.yaml Bug 30536: Update spec files 2022-05-03 11:19:51 -10:00
oauth.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
patrons.yaml Bug 29924: (QA follow-up) Remove password_expiration_date from API 2022-05-06 10:33:09 -10:00
patrons_account.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
patrons_extended_attributes.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
patrons_holds.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
patrons_password.yaml Bug 29926: (QA follow-up) Date format missing in spec 2022-05-06 10:33:10 -10:00
public_patrons.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
quotes.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00
return_claims.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
rotas.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
suggestions.yaml Bug 30663: Add x-koha-override options to /suggestions 2022-05-05 10:26:41 -03:00
transfer_limits.yaml Bug 30394: Add x-koha-request-id support on API routes 2022-04-04 16:23:46 +02:00