[rt-users] Help with a template
Joe Kirby
kirby at umbc.edu
Wed Dec 2 11:30:04 EST 2015
Thank you so much!!!
This worked great
I really do appreciate it.
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 - kirby at umbc.edu
> On Dec 2, 2015, at 11:14 AM, Matt Zagrabelny <mzagrabe at d.umn.edu> wrote:
>
> Hi Joe,
>
> This is a guess - as we don't make use of creating child tickets with templates.
>
> Replace the line, "ITNM-Topic: {$Tickets{'TOP'}->CustomFieldValuesAsString('ITNM-Topic’)}" with the following:
>
> {
> my $cf = $Tickets{TOP}->LoadCustomFieldByIdentifier('ITNM-Topic');
> my $topics = $cf->ValuesForObject($Tickets{TOP})->ItemsArrayRef;
>
> join "\n",
> map { "ITNM-Topic: " . $_->Content }
> @$topics
> ;
> }
>
> The idea here is to insert into the template a line of:
>
> ITNM-Topic: [blah]
>
> for each value in your CF.
>
> Alternatively to test things out, use the original line and an additional line to see if you can pass multiple values to a child ticket's CF:
>
> ITNM-Topic: {$Tickets{'TOP'}->FirstCustomFieldValue('ITNM-Topic’)}
> ITNM-Topic: testing_multiple_values
>
> Hopefully that child ticket will have two values in its ITNM-Topic CF.
>
> Hope that helps!
>
> -m
>
>
> On Wed, Dec 2, 2015 at 9:56 AM, Joe Kirby <kirby at umbc.edu <mailto:kirby at umbc.edu>> wrote:
> Thanks Matt
>
> When I do this ITNM-Topic: {$Tickets{'TOP'}->CustomFieldValuesAsString('ITNM-Topic’)} I still just get the first 1 in the list for the child ticket. It show fine in the parent ticket of course but is not transferring down to the child.
>
> I am on 4.2.11
>
> I appreciate your quick responses and ideas
>
> I included a snapshot of the parent and child in case that helped.
>
> <Screen Shot 2015-12-02 at 10.55.34 AM.png><Screen Shot 2015-12-02 at 10.54.57 AM.png>
>
> Joe
>
> Joe Kirby , Assistant Vice President, Business Systems
> Division of Information Technology (DoIT)
> Support Response - http://www.umbc.edu/doit <http://www.umbc.edu/doit>
> Administration 627
> Office - 410-455-3020 <tel:410-455-3020>
> Email - kirby at umbc.edu <mailto:kirby at umbc.edu>
>> On Dec 2, 2015, at 10:38 AM, Matt Zagrabelny <mzagrabe at d.umn.edu <mailto:mzagrabe at d.umn.edu>> wrote:
>>
>> On Wed, Dec 2, 2015 at 9:35 AM, Joe Kirby <kirby at umbc.edu <mailto:kirby at umbc.edu>> wrote:
>>> Matt
>>>
>>> I appreciate the suggestion however as a non-perl programmer I am not able
>>> to transition this to my template
>>
>> Sure.
>>
>>> 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’)}
>>
>> Just replace the "FirstCustomFieldValue" with "CustomFieldValuesAsString".
>>
>> -m
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20151202/b255f2ff/attachment.htm>
More information about the rt-users
mailing list