]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 23 Oct 2024 22:31:23 +0000 (22:31 +0000)
commit36cace8f70204b68f5a379adfbb10e47360177f8
tree5374b35c6321a371586a60ea482859f2140b9f60
parent3748fe30dfa705bc3184def7e67089cdea7160bb
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>
(cherry picked from commit c7c24aa8d3e856a21e50075f743a5abc39fa5797)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Items.pm