Bug 23095: Correctly display circulation rules (0 vs undef)
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 11 Jun 2019 15:44:25 +0000 (10:44 -0500)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 17 Jun 2019 07:51:24 +0000 (09:51 +0200)
commite0a93f14c96e80da3880ef1907f68d37c9413eab
treeea92964174f3a7c5c1e3644f1ba8cc41f0d5627e
parent3e31200f29b7c26a2d0e1d0fa311fc1bdcc70cb3
Bug 23095: Correctly display circulation rules (0 vs undef)

From the following commit:
  commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165
  Bug 18925: (follow-up) Fix null/empty behavior

The global test must have been adjusted as well to catch empty strings.

Actually we are expecting the plugin to return undef but the template variable contains an empty string.

So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %]
but I prefer to keep it as it for now.

Test plan:
In the section "Default checkout, hold policy by patron category"
Set total checkouts = blank
    total on-site checkouts = blank
    total holds = 0
Save
=> Without this patch the line will not appear
=> With this patch applied there must be "unlimited, unlimited, 0"

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3de89b98ce373818c4b6f5a0a90b8786996e6cfe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt