[rt-users] Extracting selectable Custom Field values via REST

2012-08-07 Thread Jonathan Delgado
Hi,

Is there a way, using the REST interface, to get a list of the acceptable 
values for a custom field that is of the "Select one value" type?

My goal is to do some simple reporting outside of the RT system, where someone 
can select a particular queue and then pull down from that queue a list of the 
selectable values for a particular custom field and get some simple search 
results back. Using the REST API would certainly be easiest for me if it was 
doable.


If this isn't possible, I would guess I am limited to the Perl API. Are there 
some good starting points and sample code to look at for someone who is well 
versed in Perl but new to the RT API?

-Jonathan




Re: [rt-users] Extracting selectable Custom Field values via REST

2012-08-08 Thread Kevin Falcone
On Tue, Aug 07, 2012 at 03:25:26PM -0400, Jonathan Delgado wrote:
> Is there a way, using the REST interface, to get a list of the acceptable 
> values for a custom field that is of the "Select one value" type?

I'm not aware of one.

> My goal is to do some simple reporting outside of the RT system, where
> someone can select a particular queue and then pull down from that
> queue a list of the selectable values for a particular custom field
> and get some simple search results back. Using the REST API would
> certainly be easiest for me if it was doable.
> 
> If this isn't possible, I would guess I am limited to the Perl API.
> Are there some good starting points and sample code to look at for
> someone who is well versed in Perl but new to the RT API?

You want to load your CustomField object and call the Values method on
it. You can look at what the EditCustomFieldSelect mason component does
(although there's a lot of noise around it because of the various pieces
of JS involved).

-kevin


pgp7kNzb2THJY.pgp
Description: PGP signature