Bug 27526: Improve grep for date fields
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 23 Jun 2021 08:35:54 +0000 (10:35 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 6 Oct 2021 09:44:22 +0000 (11:44 +0200)
'replacementpricedate' should not catch 'price'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

index 08505df..5c7802c 100644 (file)
                     [% END %]
                 [% FOREACH header IN item_header_loop %]
                     [% SET attribute = header.attribute %]
-                    [% IF header.attribute AND date_fields.grep(attribute).size %]
+                    [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
                         <td data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
                     [% ELSE %]
                         <td>[% item.$attribute | html %]</td>