]> git.koha-community.org Git - koha.git/commit
Bug 35386: Add RESTAPIRenewalBranch system preference
authorNick Clemens <nick@bywatersolutions.com>
Mon, 27 Nov 2023 16:31:41 +0000 (16:31 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 22 Mar 2024 14:07:39 +0000 (15:07 +0100)
commitc3104f4f1cb8ed1191e83ade5e9e4b55f50b2553
treebf476d5aea6511865bea1d9271b6dbb7760f79d3
parent5f6c0f0c3e896f72c086bfacec1501ee3d72fbe0
Bug 35386: Add RESTAPIRenewalBranch system preference

This patch adds a new system prefernce, RESTAPIRenewalBranch, analogous to the existing OpacRenewalBranch system preference.

The preference allows choosing how the renewal branch is recorded in the statistics table.
In order ot preserve existing behaviour, the default is to use the api user's branch.

To test:
1 - Checkout some items to a patron
2 - Add an API user account with circulation permissions and a different homebranch
3 - POST a renewal to: http://localhost:8080/api/v1/checkouts/{checkout_id}/renewal
4 - Check statistics table and confirm the api users branch was used
5 - Apply patches, restart all
6 - Repeat API renewal, confirm same branch used
7 - Change the RESTAPIRenewal syspref
8 - Repeat API renewal and confirm specified branch is used
9 - Confirm the syspref works for all settings

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Item.pm
installer/data/mysql/atomicupdate/bug_35386.pl [new file with mode: 0755]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref
t/db_dependent/Koha/Item.t