returnbranch has to pass an itemtype key when setting the rule (here
setting it to unlimited for any item types)
Test plan:
1. Go the "Circulation and fine rules" admin page
2. Set a rule for "Default checkout, hold and return policy"
3. Unset it
4. Select a library
5. Set a rule for "Default checkout, hold and return policy"
6. Unset it
Display should be consistent with what you selected
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
branchcode => $branch,
categorycode => undef,
rules => {
+ max_holds => undef,
patron_maxissueqty => undef,
patron_maxonsiteissueqty => undef,
}
Koha::CirculationRules->set_rules(
{
branchcode => $branch,
+ itemtype => undef,
rules => {
holdallowed => undef,
hold_fulfillment_policy => undef,
returnbranch => undef,
- max_holds => undef,
}
}
);