[rt-users] category & description for custom field

Ruslan Zakirov ruz at bestpractical.com
Thu Dec 8 05:01:58 EST 2011


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