RT ticket from web page?

Hi,
I’d like to include some code to input a ticket to my RT box on one of
my web pages.
I need the ability to put data in to some custom fields too.
I’d like to include some anti-spam capability on the web page too,
such as one of those distorted
images containing characters which you need to input correctly.

The RT box and apache web server are located on different boxes, on
different networks.

Is this possible and could some kind soul point me in the right
direction please?

Thanks
Mike

Hi,
I’d like to include some code to input a ticket to my RT box on one of
my web pages.
I need the ability to put data in to some custom fields too.
I’d like to include some anti-spam capability on the web page too,
such as one of those distorted
images containing characters which you need to input correctly.

The RT box and apache web server are located on different boxes, on
different networks.

Is this possible and could some kind soul point me in the right
direction please?

Sure it’s possible. There are at least two directions,
but I don’t have all the details.

Firstly, the distorted image stuff is up to you. Obviously
when you finally submit your html form, it is presented to a
CGI script, which processes the data and finally creates
the RT ticket.

Option 1. Have the CGI send email to RT. Easy, but if you
need custom fields, you’ll have to hack RT a little to
parse out the custom field values from the email,
and populate those fields.

Option 2. Have the CGI invoke the RT command line program ‘rt’.
‘rt’ is lightweight, does not require all the RT code, and
can run from almost anywhere. My recollection is that
it doesn’t handle custom fields, but I think there was
a recent patch for that. (You’d have to check list archives.)

Option 3. RT already has a web page for creating tickets. You seem
set on not running your new page directly on RT, so you probably
don’t like this option, or the idea of making a similar mason
file on RT for your special needs. Personally, I’d not go
with this option, either, but it does exist.

  bobg

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf
Of Bob Goldstein
Sent: Sunday, April 02, 2006 9:30 AM
To: Mike Dent
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT ticket from web page?

Hi,
I’d like to include some code to input a ticket to my RT box
on one of
my web pages.
I need the ability to put data in to some custom fields too.
I’d like to include some anti-spam capability on the web page too,
such as one of those distorted
images containing characters which you need to input correctly.

The RT box and apache web server are located on different boxes, on
different networks.

Is this possible and could some kind soul point me in the right
direction please?

Sure it’s possible. There are at least two directions,
but I don’t have all the details.

Firstly, the distorted image stuff is up to you. Obviously
when you finally submit your html form, it is presented to a
CGI script, which processes the data and finally creates
the RT ticket.

Option 1. Have the CGI send email to RT. Easy, but if you
need custom fields, you’ll have to hack RT a little to
parse out the custom field values from the email,
and populate those fields.

Option 2. Have the CGI invoke the RT command line program ‘rt’.
‘rt’ is lightweight, does not require all the RT code, and
can run from almost anywhere. My recollection is that
it doesn’t handle custom fields, but I think there was
a recent patch for that. (You’d have to check list archives.)

Option 3. RT already has a web page for creating tickets. You seem
set on not running your new page directly on RT, so you probably
don’t like this option, or the idea of making a similar mason
file on RT for your special needs. Personally, I’d not go
with this option, either, but it does exist.

For the anti-spam option, you are refering to what is called CAPTCHA.
See this link for more info: http://en.wikipedia.org/wiki/Captcha.
Also, here’s a Perl module I found online:
http://search.cpan.org/dist/Authen-Captcha/.

Eric Schultz
United Online

Hi,
I’d like to include some code to input a ticket to my RT box on one of
my web pages.
I need the ability to put data in to some custom fields too.
I’d like to include some anti-spam capability on the web page too,
such as one of those distorted
images containing characters which you need to input correctly.

The RT box and apache web server are located on different boxes, on
different networks.

Is this possible and could some kind soul point me in the right
direction please?

Sure it’s possible. There are at least two directions,
but I don’t have all the details.

Firstly, the distorted image stuff is up to you. Obviously
when you finally submit your html form, it is presented to a
CGI script, which processes the data and finally creates
the RT ticket.

Option 1. Have the CGI send email to RT. Easy, but if you
need custom fields, you’ll have to hack RT a little to
parse out the custom field values from the email,
and populate those fields.

Option 2. Have the CGI invoke the RT command line program ‘rt’.
‘rt’ is lightweight, does not require all the RT code, and
can run from almost anywhere. My recollection is that
it doesn’t handle custom fields, but I think there was
a recent patch for that. (You’d have to check list archives.)

Hi Bob,
the command line rt does seem to handle custom fields at least I can
query RT this way.
However when I attempt to create a simple ticket using something like:-

rt create -t ticket subject=‘new ticket’ priority=10
add cc=foo@example.com

This fails with:
rt: edit: Unrecognised argument ‘subject=new ticket’.

Am I missing something?

Thanks
Mike