]> git.koha-community.org Git - koha.git/commit
Bug 38148: Revert back to get_effective_rule
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 22 Oct 2024 10:48:14 +0000 (10:48 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Wed, 23 Oct 2024 17:14:48 +0000 (19:14 +0200)
commitc7c24aa8d3e856a21e50075f743a5abc39fa5797
treed8faf54d43b47fa5856e873c4d449df735a5e477
parente2be4e00a5bf0920786339f5f47997508be93c4d
Bug 38148: Revert back to get_effective_rule

And update the first conditional logic.
This patch aims to maintain the logic behind the first patch, but restore get_effective_rule.
get_effective_rule_value is using cache and I believe that is the reason why Items.t fail when using that.

Test plan:
1) Search for 'music' on OPAC
2) Notice records have the 'place hold' link
3) Visit circulation rules on Staff:
<staff_url>/cgi-bin/koha/admin/smart-rules.pl
4) On 'Default checkout, hold and return policy' , under 'Hold policy' pick 'From any library'. Hit 'Save'.
5) Repeat 1). Notice the 'place hold' link is gone.
6) Apply patch. restart plack. Repeat 1). Notice the 'place hold' is shown again

Run:
$ prove t/db_dependent/Koha/Items.t

Signed-off-by: andrewa <andrew.auld@ptfs-europe.com>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Items.pm