Matt
I appreciate the suggestion however as a non-perl programmer I am not able to
transition this to my template
I was hoping to have some command that would replace this line in the template
so the child ticket could receive all the values from the parent as I am
creating this dynamical via script/template
ITNM-Topic: {$Tickets{'TOP'}->FirstCustomFieldValue('ITNM-Topic’)}
If the code provided does that and my lack of knowledge of this scripting
language is the issue please just let me know and I will look into other options
Thanks
Joe
Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - [email protected]
> On Dec 1, 2015, at 5:35 PM, Matt Zagrabelny <[email protected]> wrote:
>
> On Tue, Dec 1, 2015 at 4:21 PM, Joe Kirby <[email protected]> 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