Extra 0 when displaying custom fields with multiple values

Hi,

We use custom fields with multiple values, and we notice an extra 0
after the value itself.

While we use RT 3.4.6, the code is mostly the same in RT 3.6.4, so I
wonder how nobody could have noticed that before.

When a custom field has more than one value, ShowCustomFields does the
following:

  • <% $print_value->( $CustomField, $Value ) |n %>
  • The problem is, $print_value doesn’t return a value, so 0 is used. I
    can’t really make sense of the |n here, which doesn’t change the
    resulting value, as 0|n is still 0 (why Perl parses that is beyond my
    understanding).

    The attached patch fixes the issue for me, but I really wonder what the
    intent of the previous code was. If anyone can enlighten me… And if
    the patch is the intended feature, feel free to commit it…

    Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
    "You could have made it, spitting out benchmarks
    Owe it to yourself not to fail"
    Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

    patch-local-au (417 Bytes)