Bug 25440: Fixed list of 'show_rule' forming variables in the template
authorAndrew Nugged <nugged@gmail.com>
Wed, 17 Jun 2020 20:18:01 +0000 (23:18 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 29 Jun 2020 11:44:05 +0000 (13:44 +0200)
In smart-rules.tt we have `SET show_rule = ...` section which filled
with 'all used in the loop' variables. Because if historical reasons it
seems that there are some missing, few old, and even doubled ones.
This list is fixed now by:

  - variable names 'article_requests' and 'renewalsallowed' repeated
    so duplicates are removed;

  - 'hardduedatebefore' and 'hardduedateexact' not present in the whole
    site code anywhere anymore;
    IMPORTANT NOTE: these 'hardduedatebefore/hardduedateexact' also
                    exists as remnants in .po-translation files, a lot.

  - 'note', 'hardduedatecompare', 'renewalperiod', 'rentaldiscount'
    template variables were missing from this 'show_rule =' checking
    code so they are added.

Order of fields updated to match with above "SET field = ..." pack.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 25440: (QA follow-up) Correction for typo

'engthunit -> lengthunit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt

index ce35315..cfea9b6 100644 (file)
                         [% SET article_requests = all_rules.$c.$i.article_requests %]
                         [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %]
 
-                        [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %]
+                        [% SET show_rule = note || maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalperiod || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount %]
                         [% IF show_rule %]
                             [% SET row_count = row_count + 1 %]
                             <tr row_countd="row_[% row_count | html %]">