]> 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 25 Oct 2024 13:53:45 +0000 (15:53 +0200)
commitc126a5a7093ce4bc67023296d9749f91ea9a51cf
tree7be6f90d6daed4a01acfd314ea88d82530147e34
parentf38e5c734958b7df5948ea80e6b449717b04f4be
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>
(cherry picked from commit 36cace8f70204b68f5a379adfbb10e47360177f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Items.pm