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.
Created attachment 49951 [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
Works beautifully, all tests pass. Optionally, perhaps a check for valid itemtype? Anyways, that shouldn't be a showstopper.
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>
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'
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>
Patch rebased on master
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>
Created attachment 70943 [details] [review] Bug 16213: (QA follow-up) Fix terminology Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! Enhancement, not backporting to 17.11.x