[rt-users] category & description for custom field

Marouane Himdi marouane.himdi at kereval.com
Thu Dec 8 05:06:36 EST 2011


Thanks Ruslan for your reactivity
I'll test that

----- Mail original -----
De: "Ruslan Zakirov" <ruz at bestpractical.com>
À: "Marouane HIMDI" <marouane.himdi at kereval.com>
Cc: "rt-users" <rt-users at lists.bestpractical.com>
Envoyé: Jeudi 8 Décembre 2011 11:01:58
Objet: Re: [rt-users] category & description for custom field

On Thu, Dec 8, 2011 at 13:30, Marouane Himdi <marouane.himdi at kereval.com> wrote:
> Hi all,
> How can I get category and description associated to a value of a custom
> field
> we need that to use it in a scrip

my $cf = $ticket->LoadCustomFieldByIdentifier( "CF name");
my $value = $ticket->FirstCustomFieldValue( $cf->Name );

my $value_obj = RT::CustomFieldValue->new( $ticket->CurrentUser );
$value_obj->LoadByCols( CustomField => $cf->id, Name => $value );

my $cat = $value_obj->Category;
my $desc = $value_obj->Description;

Not tested but should be close.

>
> Best regards
>
> Marouane HIMDI
> Ingénieur R&D
> (Keys : monitoring, functionnal&load-Testing, request-tracketing, ... )
>
>
>
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston — March 5 & 6, 2012



-- 
Best regards, Ruslan.



More information about the rt-users mailing list