]> git.koha-community.org Git - koha.git/commit
Bug 24154: Get rules rather than values to determine if set or not
authorNick Clemens <nick@bywatersolutions.com>
Fri, 16 Apr 2021 16:59:44 +0000 (16:59 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 10 May 2021 08:27:53 +0000 (10:27 +0200)
commit7c2a4295a22d0397b8b624454d70d155f623a7e4
tree13160d0dadcff8da33972762309e11267bf41618
parentc74f6848ed119b2a2fff687f3bddf87d23e20fd7
Bug 24154: Get rules rather than values to determine if set or not

Template plugin CirculationRules.Search returns "" if a rule doesn't
exist or if the rule exists but is set to ""

To get more info, we add a 'want_rule' parameter and use that to test
if defined but blank

To test:
1 - In circulation rules set the 'Default checkout, hold and return
    policy' without setting values
2 - Unset it
3 - Notice there is no visual difference
4 - Apply patch
5 - Reload the page
6 - note there is no 'Unset button' and first column says 'Not set'
7 - Save the rule with no values
8 - Now 'Defaults' is displayed and the unset button exists

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Template/Plugin/CirculationRules.pm
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt