On Tue, Dec 1, 2015 at 4:21 PM, Joe Kirby <ki...@umbc.edu> wrote: > I have a need to create a child ticket and pass on the values for a shared > custom field. > > This works fine when passing a field which is limited to 1 value however I > now have a multi-value custom field and I cannot find any examples of how to > pass the secondary values if they exist.
There are a couple of ways. 1) Use the built-in method. CustomFieldValuesAsString more about it can be found in: lib/RT/Record.pm 2) Have full control over the output. Here is an example that builds an HTML list: { my $cf = $Ticket->LoadCustomFieldByIdentifier('Multimedia Hub Equipment'); my $equipment = $cf->ValuesForObject($Ticket)->ItemsArrayRef; $html_equipment = 'No equipment listed.'; if (@$equipment > 0) { $html_equipment = '<ul>'; for my $item (@$equipment) { my $content = $item->Content; RT::Interface::Web::EscapeHTML(\$content); $html_equipment .= '<li>'.$content.'</li>'; } $html_equipment .= '</ul>'; } $html_equipment; } Cheers, -m