Copy Multiple value CF to the child ticket

I am creating a child ticket with some of the custom fields populated
from the parent ticket. I know that we can copy the values of the parent
CF to the child CF by:

CustomField-n: {$Tickets{‘TOP’}->FirstCustomFieldValue(‘CF Name’)}

But, how to copy multiple-value CF to the child ticket? The above code
is just populating the first selected value.

Any help is greatly appreciated.

Thanks

N Ahmed

The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

I am creating a child ticket with some of the custom fields populated from the parent ticket.
I know that we can copy the values of the parent CF to the child CF by:

CustomField-n: {$Tickets{'TOP'}->FirstCustomFieldValue('CF Name')}

But, how to copy multiple-value CF to the child ticket? The above code is just populating the
first selected value.

Given a new enough RT, CustomFieldValuesAsString will work

-kevin

I am using version 3.8.4 so CustomFieldValuesAsString is not available.

I changed the template like this:
CustomField-n: {
my $separator = “\n”;
my $CFValue = $Tickets{‘TOP’}->CustomFieldValues(n);
return join ($separator, grep { defined $_ }
map { $_->Content }
@{$CFValue->ItemsArrayRef});
}

To get the values as strings but it still not working, Am I doing
something wrong or is there any extension available for
‘CustomFieldValuesAsString’ method?

Thanks
N AhmedFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kevin
Falcone
Sent: Tuesday, January 04, 2011 5:03 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Copy Multiple value CF to the child ticket

I am creating a child ticket with some of the custom fields
populated from the parent ticket.
I know that we can copy the values of the parent CF to the child CF
by:

CustomField-n: {$Tickets{'TOP'}->FirstCustomFieldValue('CF Name')}

But, how to copy multiple-value CF to the child ticket? The above
code is just populating the
first selected value.

Given a new enough RT, CustomFieldValuesAsString will work

-kevin

The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

I am using version 3.8.4 so CustomFieldValuesAsString is not available.

I changed the template like this:
CustomField-n: {
my $separator = “\n”;
my $CFValue = $Tickets{‘TOP’}->CustomFieldValues(n);
return join ($separator, grep { defined $_ }
map { $_->Content }
@{$CFValue->ItemsArrayRef});
}

To get the values as strings but it still not working, Am I doing
something wrong or is there any extension available for
‘CustomFieldValuesAsString’ method?

Thanks
N AhmedFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kevin
Falcone
Sent: Tuesday, January 04, 2011 5:03 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Copy Multiple value CF to the child ticket

I am creating a child ticket with some of the custom fields
populated from the parent ticket.
I know that we can copy the values of the parent CF to the child CF
by:

CustomField-n: {$Tickets{'TOP'}->FirstCustomFieldValue('CF Name')}

But, how to copy multiple-value CF to the child ticket? The above
code is just populating the
first selected value.

Given a new enough RT, CustomFieldValuesAsString will work

-kevin

The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

I am using version 3.8.4 so CustomFieldValuesAsString is not available.

I changed the template like this:
CustomField-n: {
my $separator = “\n”;
my $CFValue = $Tickets{‘TOP’}->CustomFieldValues(n);
return join ($separator, grep { defined $_ }
map { $_->Content }
@{$CFValue->ItemsArrayRef});
}

To get the values as strings but it still not working, Am I doing
something wrong or is there any extension available for
‘CustomFieldValuesAsString’ method?

You could define it in a local .pm adding it into the Record, or you
could play around with warning to make sure you get the right data.
I’m not sure that return’ing in a template does what you really want.

-kevin

So, does this mean that I have to upgrade to 3.8.7 to copy multiple
value custom filed to a child ticket?

Thanks
N AhmedFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kevin
Falcone
Sent: Friday, January 07, 2011 9:44 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Copy Multiple value CF to the child ticket

I am using version 3.8.4 so CustomFieldValuesAsString is not
available.

I changed the template like this:
CustomField-n: {
my $separator = “\n”;
my $CFValue = $Tickets{‘TOP’}->CustomFieldValues(n);
return join ($separator, grep { defined $_ }
map { $_->Content }
@{$CFValue->ItemsArrayRef});
}

To get the values as strings but it still not working, Am I doing
something wrong or is there any extension available for
‘CustomFieldValuesAsString’ method?

You could define it in a local .pm adding it into the Record, or you
could play around with warning to make sure you get the right data.
I’m not sure that return’ing in a template does what you really want.

-kevin

The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

So, does this mean that I have to upgrade to 3.8.7 to copy multiple
value custom filed to a child ticket?

No, I’ll requote what I said

You could define it in a local .pm adding it into the Record, or you
could play around with warn’ing to make sure you get the right data.
I’m not sure that return’ing in a template does what you mean.

There are at least 3 things in there to try.

-kevin