[rt-users] Getting names/values for all custom fields attached to a ticket
Emmanuel Lacour
elacour at easter-eggs.com
Tue Nov 4 10:08:50 EST 2014
On Tue, Nov 04, 2014 at 02:42:57PM +0000, Chris Down wrote:
> Hello,
>
> In the Perl API, how do I get the names/values of all custom fields
> attached to a ticket? I looked at the documentation, but I only see
> ways to check for custom fields globally, not how to get a list of
> all the custom fields that apply to a single ticket.
>
my $Ticket = RT::Ticket->new( $CurrentUser );
$Ticket->Load(ID);
my $CustomFields = $Ticket->CustomFields;
while (my $CustomField = $CustomFields->Next) {
print $CustomField->Name.": ".$CustomField->Content."\n";
}
without testing, it should looks like this ;)
--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour at easter-eggs.com - http://www.easter-eggs.com
More information about the rt-users
mailing list