[rt-users] Custom Fields and Tickets in RT DB Schema
Tom Lahti
toml at bitstatement.net
Mon Jun 1 18:22:27 EDT 2009
Christian Gilmore wrote:
> Thanks, Tom, for the reply. Based on your recommendation, I searched for
> the REST documentation and found http://wiki.bestpractical.com/view/REST.
> I probably should have mentioned what I want to do. I'd like to be able to
> get a report on the breakdown of tickets by a particular custom field's
> values. I don't see an obvious way to do that through the REST interface.
> I don't see a way through the standard web search interface to do it
> wholesale, just one-by-one. Any ideas on how best to get these metrics?
If you can do the queries in TicketSQL, then you can do it with REST.
/REST/1.0/search/ticket/?query=<TicketSQL_query>&format=s
This will give you a list of tickets, which you can count.
The TicketSQL can be "CF.{Fieldname} = 'something'" or "CF.{Fieldname} > 0
and CF.{FieldName} < 100", or whatever.
Or, if using my ruby library rt-client:
rt = RT_Client.new
count = rt.list(:query => "CF.{Fieldname} = 'something'").size
--
-- ============================
Tom Lahti
BIT Statement LLC
(425)251-0833 x 117
http://www.bitstatement.net/
-- ============================
More information about the rt-users
mailing list