https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36481

David Nind <da...@davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Text to go in the|                            |This enhancement adds an
      release notes|                            |API endpoint for requesting
                   |                            |a list of cash registers
                   |                            |for a library. For example:
                   |                            |http://127.0.0.1:8080/api/v
                   |                            |1/libraries/cpl/cash_regist
                   |                            |ers
                 CC|                            |da...@davidnind.com

--- Comment #3 from David Nind <da...@davidnind.com> ---
Not able to the patch on current master without applying 36480 first. Assuming
bug 36480 needs to be added as a dependency.

Testing notes (using KTD)
=========================

1. Apply bug 36480
2. Apply the patches for this bug (and dependencies).
3. qa and tests should pass without any errors
4. Enable these system preferences:
   - UseCashRegisters
   - RESTBasicAuth 
5. Test the new API endpoint using Postman (or browser):
   - In the staff interface, add some cash registers for different libraries,
some with multiple registers
   - Add a get request to request the cash registers for a library, for
example: add two cash registers to Centerville and one to Fairfield:
     . Set Basic Auth in Postman to use koha/koha
     . http://127.0.0.1:8080/api/v1/libraries/cpl/cash_registers
     . http://127.0.0.1:8080/api/v1/libraries/ffl/cash_registers
   - Results should return the cash register information for the library, for
example:
[
    {
        "archived": false,
        "branch_default": false,
        "cash_register_id": 3,
        "description": "Test cash register for Centerville",
        "library_id": "CPL",
        "name": "TEST1",
        "starting_float": 0.0
    },
    {
        "archived": false,
        "branch_default": false,
        "cash_register_id": 4,
        "description": "Another test cash register for Centerville",
        "library_id": "CPL",
        "name": "TEST2",
        "starting_float": 0.0
    }
]
   - Put an invalid library code in the request, for example xxx:
     . http://127.0.0.1:8080/api/v1/libraries/xxx/cash_registers
     . Should get "Library not found" error
   - Disable cash registers and send above request. Should get:
      {
          "error": "Feature disabled"
      }

Note: If cash registers are enabled, but a library has none set up, then the
response is blank. Should there be an error/response saying this library has no
cash registers setup?
. Response received where library doesn't have a cash register:
  []

Path doesn't apply messages
===========================

git bz apply 36481

Bug 36481 Depends on bug 36237 (Signed Off)
Follow? [(y)es, (n)o] y

Bug 36237 - Improve set-library UI after 34478

163013 - Bug 36237: UI improvments for set-library page

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36237: UI improvments for set-library page

Bug 36481 - Add GET /libraries/:library_id/cash_registers

164228 - Bug 36481: Add GET /libraries/:library_id/cash_registers

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36481: Add GET /libraries/:library_id/cash_registers
Using index info to reconstruct a base tree...
M       Koha/REST/V1/Libraries.pm
M       api/v1/swagger/paths/libraries.yaml
M       api/v1/swagger/swagger.yaml
M       t/db_dependent/api/v1/libraries.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/api/v1/libraries.t
CONFLICT (content): Merge conflict in t/db_dependent/api/v1/libraries.t
Auto-merging api/v1/swagger/swagger.yaml
CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml
Auto-merging api/v1/swagger/paths/libraries.yaml
CONFLICT (content): Merge conflict in api/v1/swagger/paths/libraries.yaml
Auto-merging Koha/REST/V1/Libraries.pm
CONFLICT (content): Merge conflict in Koha/REST/V1/Libraries.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 36481: Add GET /libraries/:library_id/cash_registers

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to