Actually (with bug 13903) we can only filter reserves using the borrowernumber. And the filter is mandatory (it's not possible to fetch all reserves at once) We should be able to get all reserves, and to filter on other criteria as well
Created attachment 50263 [details] [review] Bug 16271: Allow more filters on /api/v1/reserves borrowernumber parameter is no longer required and you can filter on every column of reserves table Some example requests - GET /api/v1/reserves - GET /api/v1/reserves?biblionumber=123 - GET /api/v1/reserves?borrowernumber=456 - GET /api/v1/reserves?priority=0&found=W
Created attachment 50272 [details] [review] Bug 16271: Allow more filters on /api/v1/reserves borrowernumber parameter is no longer required and you can filter on every column of reserves table Some example requests - GET /api/v1/reserves - GET /api/v1/reserves?biblionumber=123 - GET /api/v1/reserves?borrowernumber=456 - GET /api/v1/reserves?priority=0&found=W Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Brilliant work Julian! Works perfectly! Let the new API rule
Can we get a follow-up to change this to holds also?
see comment#4 - needs a follow-up to be about 'holds'
Created attachment 51319 [details] [review] Bug 16271: Allow more filters on /api/v1/holds borrowernumber parameter is no longer required and you can filter on every column of reserves table Some example requests - GET /api/v1/hols - GET /api/v1/hols?biblionumber=123 - GET /api/v1/hols?borrowernumber=456 - GET /api/v1/hols?priority=0&found=W Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Created attachment 51320 [details] [review] Bug 16271: Allow more filters on /api/v1/holds borrowernumber parameter is no longer required and you can filter on every column of reserves table Some example requests - GET /api/v1/holds - GET /api/v1/holds?biblionumber=123 - GET /api/v1/holds?borrowernumber=456 - GET /api/v1/holds?priority=0&found=W Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Patch rebased on master and 'reserves' changed to 'holds'
Created attachment 52862 [details] [review] Bug 16271: Allow more filters on /api/v1/holds borrowernumber parameter is no longer required and you can filter on every column of reserves table Some example requests - GET /api/v1/holds - GET /api/v1/holds?biblionumber=123 - GET /api/v1/holds?borrowernumber=456 - GET /api/v1/holds?priority=0&found=W Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 16.11, thanks Julian!
Pushed in 16.05. Will be in 16.05.02.