[rt-users] Extract custom fields from tickets using commandline - [Pork] Email found in subject

Ben Robson benr at tlcdatasecurity.com.au
Wed Mar 12 07:17:16 EDT 2008


Dan,
 
Thanks for the reply.  I've done a whole bunch of perl hacking to and around RT, but given I can "cut-and-paste" the query field in the 'Advanced' descriptor of a query (generated via the web interface) I was hoping there might be a similar thing that could be done with the displayed fields.  This would save me doing yet more perl hacking.
 
I was able to get individual values back using '-f', for example '-f Status' would show me the ticket id's that matched the query with their Statuses, but '-f CF.{Field name}' with any combination of quotes, or CustomField instead of CF, resulted in only errors.
 
So, so far, it seems that '-f' was intended to fill what I need, but can someone confirm whether I can specify a custom field, instead of a default field?
 
 
BenR

________________________________

From: Daniel Koo [mailto:dank at bulletproof.net]
Sent: Wed 12/03/2008 6:12 PM
To: Ben Robson
Cc: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Extract custom fields from tickets using commandline - [Pork] Email found in subject



Hi Ben,

For something more involved than what the rt tool can give you I'd write
a script in Perl using the RT library. (Which is what 'rt' is, but it's
more generic)

cheers

Dan

On Wed, 2008-03-12 at 17:02 +1100, Ben Robson wrote:
> Greetings....
>
> 
>
> I was wondering if anyone had any advice on how to best, from the
> command line, conduct a search for tickets that match a custom field
> value ('CF.{Invoiced Date}' > '2008-04-03') show values in a custom
> field in matching tickets ('CF.{Purchase Order Number}').
>
> 
>
> The intention is to use a cron task to find all tickets, who's
> invoiced date was last month and get the purchase order numbers
> associated with those tickets.
>
> 
>
> I can get ./rt to show me the tickets using:  ./rt ls "Queue = 'PSS
> Projects' AND 'CF.{Invoicable Date}' > '2008-03-31'" and adding a -l
> will give me the pro-forma fields, but not the associated custom
> fields.
>
> 
>
> Any hints?
>
> 
>
> BenR
>
> 
>
>
>    The information contained in this communication is intended solely
> for the use of the individual or entity to whom it is addressed and
> others authorised to receive it.  It may contain confidential or
> legally privileged information.  If you are not the intended recipient
> you are hereby notified that any disclosure, copying, distribution or
> taking any action in reliance on the contents of this information is
> strictly prohibited and may be unlawful.  If you have received this
> communication in error, please notify us immediately by responding to
> this email and then delete it, and any associated attachments, from
> your system.  Thank you.
> 
>
> 
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com <http://wiki.bestpractical.com/> 
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com <http://rtbook.bestpractical.com/> 
--
Daniel Koo
Developer
Bulletproof Networks
www.bulletproof.net
tel: 1300 663 903
fax: 02 9662 4744
"Hosting that just works."

This e-mail and any attachments are confidential and may be legally
privileged. Only the intended recipient may access or use it and no
confidentiality or privilege is waived or lost by mistaken
transmission. If you are not the intended recipient you must not
copy or disclose this email's contents to any person and you must
delete it and notify us immediately. Bulletproof Networks uses
virus scanning software but excludes all liability for viruses or
similar in any attachment as well as for any error or
incompleteness in the contents of this e-mail.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080312/2e645d17/attachment.htm>


More information about the rt-users mailing list