Bug 18103

Summary: REST API: Add endpoint for patron status / blocks
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: REST APIAssignee: Lari Taskula <lari.taskula>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, mirko
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 16826    
Bug Blocks:    
Attachments: Bug 18013: Add patronstatus to Swagger
Bug 18013: Add patronstatus operation to controller
Bug 18103: Add patronstatus to Swagger
Bug 18103: Add patronstatus operation to controller

Description Lari Taskula 2017-02-13 13:04:58 UTC
Add endpoint that returns information on patron's debarments / excessive fines etc. This endpoint can be used to find out patron's ability for checkouts and holds.
Comment 1 Lari Taskula 2017-02-13 16:09:06 UTC
Created attachment 60159 [details] [review]
Bug 18013: Add patronstatus to Swagger

This patch adds the Swagger definition for patronstatus.
Comment 2 Lari Taskula 2017-02-13 16:10:31 UTC
Created attachment 60160 [details] [review]
Bug 18013: Add patronstatus operation to controller

This patch adds patronstatus operation to Koha::REST::V1::Patron.

Also adds new method Koha::Patron->status_not_ok that returns an array of
Koha::Exceptions if there are some issues with patron status.

To test:
1. prove t/db_dependent/Koha/Patrons.t
2. prove t/db_dependent/api/v1/patrons.t
Comment 3 Lari Taskula 2017-02-13 16:11:00 UTC
Tests are still failing due to data type changes.
Comment 4 Lari Taskula 2017-02-13 16:12:05 UTC
Created attachment 60161 [details] [review]
Bug 18103: Add patronstatus to Swagger

This patch adds the Swagger definition for patronstatus.
Comment 5 Lari Taskula 2017-02-13 16:12:22 UTC
Created attachment 60162 [details] [review]
Bug 18103: Add patronstatus operation to controller

This patch adds patronstatus operation to Koha::REST::V1::Patron.

Also adds new method Koha::Patron->status_not_ok that returns an array of
Koha::Exceptions if there are some issues with patron status.

To test:
1. prove t/db_dependent/Koha/Patrons.t
2. prove t/db_dependent/api/v1/patrons.t
Comment 6 Lari Taskula 2017-02-13 16:13:44 UTC
Corrected invalid Bug number.
Comment 7 Mirko Tietgen 2017-05-17 10:15:21 UTC
Is this ready to be tested? Please set the status to "Needs signoff" then.