Bug 16213 - Allow to select hold's itemtype when using API
Summary: Allow to select hold's itemtype when using API
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST api (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Josef Moravec
URL:
Whiteboard:
Keywords:
Depends on: 13903 15533
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-06 11:31 UTC by Julian Maurice
Modified: 2018-02-02 15:13 UTC (History)
6 users (show)

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


Attachments
Bug 16213: Allow to select hold's itemtype when using API (4.39 KB, patch)
2016-04-06 11:31 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 16213: Allow to select hold's itemtype when using API (4.46 KB, patch)
2016-04-07 10:56 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 16213: Allow to select hold's itemtype when using API (5.00 KB, patch)
2017-10-16 13:06 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 16213: Allow to select hold's itemtype when using API (5.03 KB, patch)
2018-01-26 09:30 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 16213: (QA follow-up) Fix terminology (912 bytes, patch)
2018-01-26 09:30 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2016-04-06 11:31:16 UTC
Bug 15533 bring the capability to select an itemtype for a title-level hold in staff and OPAC.

This should be possible through the API too.
Comment 1 Julian Maurice 2016-04-06 11:31:54 UTC Comment hidden (obsolete)
Comment 2 Benjamin Rokseth 2016-04-07 10:55:21 UTC
Works beautifully, all tests pass.

Optionally, perhaps a check for valid itemtype? Anyways, that shouldn't be a showstopper.
Comment 3 Benjamin Rokseth 2016-04-07 10:56:16 UTC
Created attachment 50017 [details] [review]
Bug 16213: Allow to select hold's itemtype when using API

Depends on bug 15533 and bug 13903

Test plan:
1/ Use your usual "REST testing" tool to place a title-level hold with
an itemtype. The request should look like this:

POST /api/v1/reserves
{
    "borrowernumber": 1234,
    "biblionumber": 456,
    "branchcode": "CPL",
    "itemtype": "A"
}

2/ Check that the hold was placed and the itemtype is correctly selected
3/ prove t/db_dependent/api/v1/reserves.t

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Comment 4 Kyle M Hall 2016-06-24 18:41:12 UTC
prove t/db_dependent/api/v1/holds.t
t/db_dependent/api/v1/holds.t .. 1/39
#   Failed test '200 OK'
#   at t/db_dependent/api/v1/holds.t line 135.
#          got: '404'
#     expected: '200'

#   Failed test '201 Created'
#   at t/db_dependent/api/v1/holds.t line 145.
#          got: '404'
#     expected: '201'
Comment 5 Julian Maurice 2017-10-16 13:06:36 UTC
Created attachment 68179 [details] [review]
Bug 16213: Allow to select hold's itemtype when using API

Test plan:
1/ Use your usual "REST testing" tool to place a title-level hold with
an itemtype. The request should look like this:

POST /api/v1/holds
{
    "borrowernumber": 1234,
    "biblionumber": 456,
    "branchcode": "CPL",
    "itemtype": "A"
}

2/ Check that the hold was placed and the itemtype is correctly selected
3/ prove t/db_dependent/api/v1/holds.t

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Comment 6 Julian Maurice 2017-10-16 13:07:00 UTC
Patch rebased on master
Comment 7 Josef Moravec 2018-01-26 09:30:03 UTC
Created attachment 70942 [details] [review]
Bug 16213: Allow to select hold's itemtype when using API

Test plan:
1/ Use your usual "REST testing" tool to place a title-level hold with
an itemtype. The request should look like this:

POST /api/v1/holds
{
    "borrowernumber": 1234,
    "biblionumber": 456,
    "branchcode": "CPL",
    "itemtype": "A"
}

2/ Check that the hold was placed and the itemtype is correctly selected
3/ prove t/db_dependent/api/v1/holds.t

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Josef Moravec 2018-01-26 09:30:06 UTC
Created attachment 70943 [details] [review]
Bug 16213: (QA follow-up) Fix terminology

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Jonathan Druart 2018-01-30 17:25:45 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 10 Nick Clemens 2018-02-02 15:13:36 UTC
Awesome work all! Enhancement, not backporting to 17.11.x