[rt-users] RT ticket from web page?

Mike Dent mcdent at gmail.com
Mon Apr 3 12:45:04 EDT 2006


On 4/2/06, Bob Goldstein <bobg at uic.edu> wrote:
> >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 at example.com

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

Am I missing something?

Thanks
Mike



>
>   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
>



More information about the rt-users mailing list