Bug 18120 - CRUD endpoint for vendors
Summary: CRUD endpoint for vendors
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST api (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Tomás Cohen Arazi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 18137 19130
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-15 07:57 UTC by Matthias Meusburger
Modified: 2017-11-23 20:26 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18120: REST api | /acquisitions/vendors unit tests (14.70 KB, patch)
2017-03-06 19:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | Add a 'vendors' endpoint (17.83 KB, patch)
2017-03-06 19:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | /acquisitions/vendors unit tests (16.35 KB, patch)
2017-03-16 17:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | Add a 'vendors' endpoint (18.23 KB, patch)
2017-03-16 17:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: (followup) Make operationId unique (2.05 KB, patch)
2017-03-23 18:52 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: (followup) Make operationId unique (3.26 KB, patch)
2017-05-04 18:07 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | /acquisitions/vendors unit tests (16.41 KB, patch)
2017-05-05 12:12 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 18120: REST api | Add a 'vendors' endpoint (18.25 KB, patch)
2017-05-05 12:12 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 18120: (followup) Make operationId unique (3.33 KB, patch)
2017-05-05 12:13 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 18120 - Changes to some field descriptions (1.51 KB, patch)
2017-08-15 21:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 18120: REST api | /acquisitions/vendors unit tests (16.49 KB, patch)
2017-08-22 17:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | Add a 'vendors' endpoint (21.63 KB, patch)
2017-08-22 17:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | /acquisitions/vendors unit tests (16.54 KB, patch)
2017-08-24 14:01 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18120: REST api | Add a 'vendors' endpoint (21.63 KB, patch)
2017-08-24 14:01 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18120: REST api | /acquisitions/vendors unit tests (16.59 KB, patch)
2017-08-24 15:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: REST api | Add a 'vendors' endpoint (21.69 KB, patch)
2017-08-24 15:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: Update field descriptions (1.56 KB, patch)
2017-08-24 15:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: (QA followup) 'vendors_manage' permission fits better than full acq (1.40 KB, patch)
2017-08-24 17:49 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: /acquisitions/vendors unit tests (16.59 KB, patch)
2017-09-22 18:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: Add '/acquisitions/vendors' endpoint (21.74 KB, patch)
2017-09-22 18:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: Update field descriptions (1.56 KB, patch)
2017-09-22 18:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: (QA followup) 'vendors_manage' permission fits better than full acq (1.41 KB, patch)
2017-09-22 18:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: (QA followup) Add POD to controler class (2.40 KB, patch)
2017-09-22 18:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18120: Tidy up (2.71 KB, patch)
2017-09-29 20:10 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2017-02-15 07:57:35 UTC
Add an endpoint for handling vendors.
Comment 1 Tomás Cohen Arazi 2017-03-06 19:44:53 UTC
Created attachment 60851 [details] [review]
Bug 18120: REST api | /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions
Comment 2 Tomás Cohen Arazi 2017-03-06 19:44:59 UTC
Created attachment 60852 [details] [review]
Bug 18120: REST api | Add a 'vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions
Comment 3 Tomás Cohen Arazi 2017-03-16 17:29:32 UTC
Created attachment 61182 [details] [review]
Bug 18120: REST api | /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions
Comment 4 Tomás Cohen Arazi 2017-03-16 17:29:38 UTC
Created attachment 61183 [details] [review]
Bug 18120: REST api | Add a 'vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions
Comment 5 Tomás Cohen Arazi 2017-03-23 18:52:55 UTC
Created attachment 61587 [details] [review]
Bug 18120: (followup) Make operationId unique
Comment 6 Matthias Meusburger 2017-05-04 14:27:17 UTC
The last patch "Bug 18120: (followup) Make operationId unique" breaks the tests.

Without the last patch, I've tested the endpoint and ran the tests successfully.
Comment 7 Tomás Cohen Arazi 2017-05-04 18:07:16 UTC
Created attachment 63146 [details] [review]
Bug 18120: (followup) Make operationId unique

This patch renames the method names, and the operationID on the swagger spec
so they are unique.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Matthias Meusburger 2017-05-05 12:12:04 UTC
Created attachment 63163 [details] [review]
Bug 18120: REST api | /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Comment 9 Matthias Meusburger 2017-05-05 12:12:28 UTC
Created attachment 63164 [details] [review]
Bug 18120: REST api | Add a 'vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Comment 10 Matthias Meusburger 2017-05-05 12:13:11 UTC
Created attachment 63165 [details] [review]
Bug 18120: (followup) Make operationId unique

This patch renames the method names, and the operationID on the swagger spec
so they are unique.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Comment 11 Katrin Fischer 2017-08-15 21:59:49 UTC
Created attachment 66046 [details] [review]
Bug 18120 - Changes to some field descriptions

Trying to clarify some of the descriptions.
Comment 12 Katrin Fischer 2017-08-15 22:02:46 UTC
I have added a patch with some suggestions for rephrasing/changing the descriptions a bit.

Currently this endpoint seems to check for full acquisitions permission:

+        "permissions": {
+          "acquisition": "1"
+        }
+      }

I think we could make this less strict, as we have a separate permission for dealing with vendors:

  vendors_manage - Manage vendors 

This would also make it easier if you need the vendors for serials, but don't want to give more access than necessary:
Comment 13 Tomás Cohen Arazi 2017-08-22 17:08:00 UTC
Created attachment 66362 [details] [review]
Bug 18120: REST api | /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Comment 14 Tomás Cohen Arazi 2017-08-22 17:08:09 UTC
Created attachment 66363 [details] [review]
Bug 18120: REST api | Add a 'vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Comment 15 Tomás Cohen Arazi 2017-08-22 17:09:17 UTC
Patches rebased on top of bug 18137 (OpenAPI). Test plan applies and tests pass.
Comment 16 Kyle M Hall 2017-08-24 14:01:33 UTC
Created attachment 66417 [details] [review]
Bug 18120: REST api | /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Kyle M Hall 2017-08-24 14:01:40 UTC
Created attachment 66418 [details] [review]
Bug 18120: REST api | Add a 'vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Katrin Fischer 2017-08-24 14:59:54 UTC
Had submitted a follow-up with suggestions - was lost in rebase :(
Comment 19 Tomás Cohen Arazi 2017-08-24 15:05:21 UTC
Created attachment 66427 [details] [review]
Bug 18120: REST api | /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 20 Tomás Cohen Arazi 2017-08-24 15:05:30 UTC
Created attachment 66428 [details] [review]
Bug 18120: REST api | Add a 'vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 21 Tomás Cohen Arazi 2017-08-24 15:05:40 UTC
Created attachment 66429 [details] [review]
Bug 18120: Update field descriptions

Trying to clarify some of the descriptions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 22 Tomás Cohen Arazi 2017-08-24 17:49:52 UTC
Created attachment 66430 [details] [review]
Bug 18120: (QA followup) 'vendors_manage' permission fits better than full acq

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 23 Jonathan Druart 2017-09-21 15:01:04 UTC
Please double check POD coverage.
Comment 24 Tomás Cohen Arazi 2017-09-22 18:39:11 UTC
Created attachment 67326 [details] [review]
Bug 18120: /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 25 Tomás Cohen Arazi 2017-09-22 18:39:29 UTC
Created attachment 67327 [details] [review]
Bug 18120: Add '/acquisitions/vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 26 Tomás Cohen Arazi 2017-09-22 18:39:42 UTC
Created attachment 67328 [details] [review]
Bug 18120: Update field descriptions

Trying to clarify some of the descriptions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 27 Tomás Cohen Arazi 2017-09-22 18:39:58 UTC
Created attachment 67329 [details] [review]
Bug 18120: (QA followup) 'vendors_manage' permission fits better than full acq

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 28 Tomás Cohen Arazi 2017-09-22 18:40:14 UTC
Created attachment 67330 [details] [review]
Bug 18120: (QA followup) Add POD to controler class

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 29 Jonathan Druart 2017-09-29 20:10:33 UTC
Created attachment 67490 [details] [review]
Bug 18120: Tidy up
Comment 30 Jonathan Druart 2017-09-29 20:17:28 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 31 Fridolin SOMERS 2017-10-27 12:41:16 UTC
New feature not pushed to 17.05.x