Extraneous '<br>' in CustomField value

I’ve made a small mod to Elements/MyTickets (and Elements/MyRequests),
to show a column with a custom field (CustomFiels.{Client}). Next, I
have made the field a hyperlink, which runs a search on all open and
new tickets that match that client.

The problem: When I include in the href CustomField.{Client}, the
value that is being inserted in the URL is appended with ‘
’, which
of course makes the query useless.

I’ve tracked the extra tag to Elements/RT__Ticket/ColumnMap, line 86
(in the latest devel snapshot). Commenting out the line resolves my
issue, but I have no idea if this is breaking anything else.

Could somebody enlighten me?

RT 3.4.2-4 on Debian Sarge

Thanks
Yan

I’ve made a small mod to Elements/MyTickets (and Elements/MyRequests),
to show a column with a custom field (CustomFiels.{Client}). Next, I
have made the field a hyperlink, which runs a search on all open and
new tickets that match that client.

The problem: When I include in the href CustomField.{Client}, the
value that is being inserted in the URL is appended with ‘
’, which
of course makes the query useless.

I’ve tracked the extra tag to Elements/RT__Ticket/ColumnMap, line 86
(in the latest devel snapshot). Commenting out the line resolves my
issue, but I have no idea if this is breaking anything else.
We add
there to separate several values of a field. You know
filed may have several values. I agree that code could be smarter.

Could somebody enlighten me?
You can made the same thing in different way. Add callback that put
into COLUMN_MAP code for the ‘Client’ custom field. If you look closer
into Elements/RT__Ticket/ColumnMap you could see that if $COLUMN_MAP
hash has two entries with key “CustomField.{Client}” and “CF.{Client}”
then RT never run line 86, but uses these entries to display values of
the CF.

Fill this entries with hash reference:
{
attribute => undef,
title => ‘Client’,
value => sub {
my $values = $[0]->CustomFieldValues($field);
return \join ‘,’, map {
’. $
->Content .‘
} @{ $values->ItemsArrayRef };
},
}

RT 3.4.2-4 on Debian Sarge

Thanks
Yan


List info: The rt-devel Archives

Best Practical is hiring! Come hack Perl for us: Careers — Best Practical Solutions

Best regards, Ruslan.