Reporting on custom fields

Hi all,

Just installed RT 3.0.6 and joined the list, so hello rt-users.

So far I’ve got a functional RT installation, one primary queue, and some
queue-specific custom fields. I’d like to produce a basic report on the
tickets in this queue; the headers of the report should be the standard
RT fields as well as the custom fields. Looking in the add-ons directory
I’ve found an example of reporting on the standard fields, but I can’t
figure out how to list the custom fields (and then also their values) as
well.

There must be a standard idiom for this, but I’m having trouble figuring
out how to get the CustomField names and values using the RT object
interface. Obviously I could do all this just querying the database
directly and skipping the RT layer, but I’d like to figure out how to do
it through RT.

Any suggestions?

thanks in advance…

michael

Looking in the add-ons directory
I’ve found an example of reporting on the standard fields, but I can’t
figure out how to list the custom fields (and then also their values) as
well.

Have a look at the bug list for RT. http://lists.fsck.com/pipermail/rt-users/2003-April/013159.html

Michael

Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”

Looking in the add-ons directory
I’ve found an example of reporting on the standard fields, but I can’t
figure out how to list the custom fields (and then also their values)
as well.

Have a look at the bug list for RT.
http://lists.fsck.com/pipermail/rt-users/2003-April/013159.html

Thanks, Michael.

Yes, I’ve seen that, and it gets me part of the way there but not all; it
assumes you know in advance the list of custom fields. What I’d like to
do is get a list of all the custom fields defined for a particular queue,
then add those field names to my header list and add the value for each
field to the row for each ticket.

Or am I missing something? It seems like this should be a straightforward
operation once you know which method to call on which class to get the
information, but I can’t figure out which method that would be. Maybe it
doesn’t exist… :slight_smile:

Thanks again for your help… any more suggestions?

michael

Yes, I’ve seen that, and it gets me part of the way there but not all; it
assumes you know in advance the list of custom fields. What I’d like to
do is get a list of all the custom fields defined for a particular queue,
then add those field names to my header list and add the value for each
field to the row for each ticket.

From the RT::Queue_Overlay perldoc:
CustomFields
Returns an RT::CustomFields object containing all
global custom fields, as well as those tied to this queue

So you need to do something like $ticket->QueueObj->CustomFields().

Michael

Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”