]> git.koha-community.org Git - koha.git/commit
Bug 19618: Add api endpoint for club holds
authorAgustin Moyano <agustinmoyano@theke.io>
Tue, 10 Sep 2019 06:20:38 +0000 (03:20 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 1 Oct 2019 07:05:58 +0000 (08:05 +0100)
commita902efb83b203f2f99938388acd88f3fc059422a
treef5b6a7cc87569ba734c11420001164f792c6f0b0
parent7aeec1bfef47ea83ceeb51d552c1f5e537a1b84c
Bug 19618: Add api endpoint for club holds

This patch adds an endpoint in thi api in /api/v1/clubs/{club_id}/holds whith the verb POST that maps to Koha::REST::V1::Clubs::Holds#add controller.
Classes for club_holds and club_holds_to_patron_holds new tables where also added.

To test:
1) Reach SUCCESS.3 test point of previous patch with club that has no enrollments
2) Click on "Place Hold"
SUCCESS => an alert should appear that you cannot place hold on a club without patrons
3) Reach SUCCESS.3 test point of previous patch with club that has enrollments
4) Click on "Place Hold"
SUCCESS => holds priority list should appear with holds for every patron in club
5) Repeat steps 3 and 4.
SUCCESS => new holds should appear in different order
6) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 files changed:
Koha/Club/Hold.pm [new file with mode: 0644]
Koha/Club/Hold/PatronHold.pm [new file with mode: 0644]
Koha/Club/Hold/PatronHolds.pm [new file with mode: 0644]
Koha/Club/Holds.pm [new file with mode: 0644]
Koha/Exceptions/ClubHold.pm [new file with mode: 0644]
Koha/REST/V1/Clubs/Holds.pm [new file with mode: 0644]
api/v1/swagger/definitions/club_hold.json [new file with mode: 0644]
api/v1/swagger/definitions/club_hold_patron_hold.json [new file with mode: 0644]
api/v1/swagger/definitions/club_hold_patron_holds.json [new file with mode: 0644]
api/v1/swagger/definitions/club_holds.json [new file with mode: 0644]
api/v1/swagger/parameters.json
api/v1/swagger/parameters/club.json [new file with mode: 0644]
api/v1/swagger/paths.json
api/v1/swagger/paths/clubs.json [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt