Bug 37256 - Add an endpoint to allow setting circulation rule sets
Summary: Add an endpoint to allow setting circulation rule sets
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on: 36641
Blocks: 10190
  Show dependency treegraph
 
Reported: 2024-07-04 11:41 UTC by Martin Renvoize (ashimema)
Modified: 2024-09-19 13:17 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 37256: Defined 'context' of circulation rules (3.76 KB, patch)
2024-08-02 13:48 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Add 'PUT' for circulation rule sets (5.21 KB, patch)
2024-08-02 13:48 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Defined 'context' of circulation rules (6.43 KB, patch)
2024-08-07 10:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Unit tests for set_rules (5.01 KB, patch)
2024-08-07 10:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Add 'PUT' for circulation rule sets (5.33 KB, patch)
2024-08-07 10:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Defined 'context' of circulation rules (6.43 KB, patch)
2024-08-08 08:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Unit tests for set_rules (5.80 KB, patch)
2024-08-08 08:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Add 'PUT' for circulation rule sets (5.42 KB, patch)
2024-08-08 08:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Defined 'context' of circulation rules (6.43 KB, patch)
2024-08-15 07:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Unit tests for set_rules (5.80 KB, patch)
2024-08-15 07:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Add 'PUT' for circulation rule sets (5.42 KB, patch)
2024-08-15 07:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Ensure empty and null work as expected in PUT (2.50 KB, patch)
2024-08-15 07:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Defined 'context' of circulation rules (6.81 KB, patch)
2024-09-19 13:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Unit tests for set_rules (5.80 KB, patch)
2024-09-19 13:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Add 'PUT' for circulation rule sets (5.42 KB, patch)
2024-09-19 13:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Ensure empty and null work as expected in PUT (2.50 KB, patch)
2024-09-19 13:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Defined 'context' of circulation rules (6.97 KB, patch)
2024-09-19 13:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Unit tests for set_rules (5.97 KB, patch)
2024-09-19 13:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Add 'PUT' for circulation rule sets (5.58 KB, patch)
2024-09-19 13:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37256: Ensure empty and null work as expected in PUT (2.66 KB, patch)
2024-09-19 13:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2024-07-04 11:41:14 UTC
With bug 36641 we allow fetching a keys list of effective circulation rules given a combination of library, patron category and item type.

It would be great to have some endpoints to allow setting circulation rules via the API too.
Comment 1 Martin Renvoize (ashimema) 2024-08-02 13:48:02 UTC Comment hidden (obsolete)
Comment 2 Martin Renvoize (ashimema) 2024-08-02 13:48:04 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize (ashimema) 2024-08-02 13:48:53 UTC
Initial submission to try and get some feedback from other API devs.. Tomas, I'm looking at you here ;P
Comment 4 Martin Renvoize (ashimema) 2024-08-07 10:35:03 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize (ashimema) 2024-08-07 10:35:06 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize (ashimema) 2024-08-07 10:35:09 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize (ashimema) 2024-08-08 08:33:10 UTC
Created attachment 170152 [details] [review]
Bug 37256: Defined 'context' of circulation rules

This is a follow-up to the previous bug exposing circulation rules over
the API.

We formally define a definition for a circulation rules set including a
new 'context' object the defines the context, library_id,
patron_category_id and item_type_id combination of the rules returned.

This is just a patch I missed in the last submission that I'd meant to
add and it's important for the PUT part of this patchset.
Comment 8 Martin Renvoize (ashimema) 2024-08-08 08:33:13 UTC
Created attachment 170153 [details] [review]
Bug 37256: Unit tests for set_rules

This patch adds unit tests for the to be introduced set_rules endpoint
for setting circualtion rule sets.
Comment 9 Martin Renvoize (ashimema) 2024-08-08 08:33:16 UTC
Created attachment 170154 [details] [review]
Bug 37256: Add 'PUT' for circulation rule sets
Comment 10 Martin Renvoize (ashimema) 2024-08-15 07:52:01 UTC
Created attachment 170335 [details] [review]
Bug 37256: Defined 'context' of circulation rules

This is a follow-up to the previous bug exposing circulation rules over
the API.

We formally define a definition for a circulation rules set including a
new 'context' object the defines the context, library_id,
patron_category_id and item_type_id combination of the rules returned.

This is just a patch I missed in the last submission that I'd meant to
add and it's important for the PUT part of this patchset.
Comment 11 Martin Renvoize (ashimema) 2024-08-15 07:52:04 UTC
Created attachment 170336 [details] [review]
Bug 37256: Unit tests for set_rules

This patch adds unit tests for the to be introduced set_rules endpoint
for setting circualtion rule sets.
Comment 12 Martin Renvoize (ashimema) 2024-08-15 07:52:06 UTC
Created attachment 170337 [details] [review]
Bug 37256: Add 'PUT' for circulation rule sets
Comment 13 Martin Renvoize (ashimema) 2024-08-15 07:52:09 UTC
Created attachment 170338 [details] [review]
Bug 37256: Ensure empty and null work as expected in PUT
Comment 14 Martin Renvoize (ashimema) 2024-09-19 13:10:44 UTC
Created attachment 171719 [details] [review]
Bug 37256: Defined 'context' of circulation rules

This is a follow-up to the previous bug exposing circulation rules over
the API.

We formally define a definition for a circulation rules set including a
new 'context' object the defines the context, library_id,
patron_category_id and item_type_id combination of the rules returned.

This is just a patch I missed in the last submission that I'd meant to
add and it's important for the PUT part of this patchset.
Comment 15 Martin Renvoize (ashimema) 2024-09-19 13:10:46 UTC
Created attachment 171720 [details] [review]
Bug 37256: Unit tests for set_rules

This patch adds unit tests for the to be introduced set_rules endpoint
for setting circualtion rule sets.
Comment 16 Martin Renvoize (ashimema) 2024-09-19 13:10:49 UTC
Created attachment 171721 [details] [review]
Bug 37256: Add 'PUT' for circulation rule sets
Comment 17 Martin Renvoize (ashimema) 2024-09-19 13:10:51 UTC
Created attachment 171722 [details] [review]
Bug 37256: Ensure empty and null work as expected in PUT
Comment 18 Martin Renvoize (ashimema) 2024-09-19 13:16:38 UTC
Created attachment 171723 [details] [review]
Bug 37256: Defined 'context' of circulation rules

This is a follow-up to the previous bug exposing circulation rules over
the API.

We formally define a definition for a circulation rules set including a
new 'context' object the defines the context, library_id,
patron_category_id and item_type_id combination of the rules returned.

This is just a patch I missed in the last submission that I'd meant to
add and it's important for the PUT part of this patchset.

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Comment 19 Martin Renvoize (ashimema) 2024-09-19 13:16:41 UTC
Created attachment 171724 [details] [review]
Bug 37256: Unit tests for set_rules

This patch adds unit tests for the to be introduced set_rules endpoint
for setting circulation rule sets.

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Comment 20 Martin Renvoize (ashimema) 2024-09-19 13:16:43 UTC
Created attachment 171725 [details] [review]
Bug 37256: Add 'PUT' for circulation rule sets

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Comment 21 Martin Renvoize (ashimema) 2024-09-19 13:16:46 UTC
Created attachment 171726 [details] [review]
Bug 37256: Ensure empty and null work as expected in PUT

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Comment 22 Martin Renvoize (ashimema) 2024-09-19 13:17:43 UTC
Thoroughly tested as part of testing bug 10190.