[Rt-devel] Reporting tickets from a script, getting ticket ID back?

Rolf Grossmann rg at progtech.net
Wed Aug 3 12:08:45 EDT 2005


Petter Reinholdtsen wrote:

> I found a thread from 2001 giving an example, and have implemented
> this.
> <URL:http://lists.bestpractical.com/pipermail/rt-devel/2001-April/001108.html>.
> Is this still the best way to do this?

Jesse's anwer to that post already hints at a better way to do this now.

> The script I have at the moment work, but it seem rather crude to call
> rt-mailgate in debug mode just to get the ticket-ID out.  Is there no
> simpler way?  Perhaps rt-mailgate should get some extra functionality
> to allow it to print the ticket-ID to stdout on request?

If you're already calling a perl script, you don't have to call 
rt-mailgate from it. There are some examples in the wiki 
(http://wiki.bestpractical.com/index.cgi?Contributions), but none is 
creating a ticket. The simplest one is for creating a user, see 
http://download.bestpractical.com/pub//rt/contrib/3.0/Other/rtadduser
To create a ticket you basically replace RT::User with RT::Ticket and 
use some different arguments with Create. If you need more help, just ask.

Rolf.


More information about the Rt-devel mailing list