[koha-commits] main Koha release repository branch master updated. v16.11.00-905-g694c09a

Git repo owner gitmaster at git.koha-community.org
Mon Apr 24 15:44:59 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, master has been updated
       via  694c09aa873973c4f55b5d90948b1027adc0f1c1 (commit)
      from  4eb53eeee9dbf1c4c3a4c6da48148e0a0d27f0fe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 694c09aa873973c4f55b5d90948b1027adc0f1c1
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Fri Apr 21 20:34:00 2017 -0300

    Bug 18409: Make the controller for holds use Koha::Holds
    
    Recently, there's been a major fix on the REST api swagger spec,
    which involved fixing boolean values so they are actually booleans
    and Koha::Object was extended to handle that.
    While the swagger spec for this endpoint got fixed, such is not the case
    with the implementation (the controller class).
    
    This patch fixes this situation by:
    - Specifying boolean properties as boolean in the schema file
    - Fixes the controller so it returns Koha::Hold objects instead of the
      hashref returned by GetReserve, which is wrong.
    - Better (than empty) descriptions are added to 'suspend',
      'suspend_until' and 'lowestPriority' on the spec.
    
    To test:
    - Run:
      $ sudo koha-shell kohadev
     k$ cd kohaclone
     k$ prove t/db_dependent/api/v1/holds.t
    => FAIL: Tests fail, mostly due to error 500 results.
    - Apply this patch
    - Run:
     k$ prove t/db_dependent/api/v1/holds.t
    => SUCCESS: Tests pass!
    - Sign off :-D
    
    This can also be tested using any interface for REST apis.
    
    Note: This endpoint lacks several of the new guidelines and is not
    complete (there's no GET for single holds, etc). It is also missing
    exception handling. There are probably
    other bug reports for that, just thought it was worth mentioning.
    
    Followed test plan and this patch worked as intended
    Signed-off-by: Alex Buckley <alexbuckley at catalyst.net.nz>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-----------------------------------------------------------------------

Summary of changes:
 Koha/REST/V1/Hold.pm                 |    7 ++++---
 Koha/Schema/Result/Reserve.pm        |    5 +++++
 api/v1/swagger/definitions/hold.json |    6 +++---
 3 files changed, 12 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list