[rt-users] Best ways to create a web based ticket submissionwithout login?

Schincke, Keith D. (JSC-IT)[MEI] Keith.D.Schincke at nasa.gov
Thu Aug 30 16:41:49 EDT 2007


I had to make a simular form locally.

I used Perl CGI to generate the basic form.
I used RT;, RT::Ticket, RT::Current_user and RT::Interface::CLI; to
create the ticket.

The cgi script is fairly simple. If there are no parameters, print the
form. Otherwise, marshel the arguments and create a ticket.

Here are the basics of my ticket creation. Good luck.

#($q is my Perl CGI object)

my $CurrentUser = new RT::CurrentUser();
$CurrentUser->LoadByName( 'your rt username for CGI tickets' ) ;
my $ticket = new RT::Ticket($CurrentUser);
my $ticket_body = MIME::Entity->build(Data => $COMMENT,
	Type => 'text/plain');

my %ticket_vals = ( Queue => 'Your default queue',
        Subject => "$value from form" ,
        Owner => "$optional name",
        Requestor => 'Could be the cgi user or as entered from form',
        InitialPriority => '11',
        FinalPriority => '20',
        MIMEObj => $ticket_body,
        'CustomField-7' => $CGI_VALUE1 ,
        'CustomField-8' => $CGI_VALUE2 ,
        );

my ($id, $transaction_object, $err) = $ticket->Create(%ticket_vals);

if( $id == 0 )
{
        print STDERR $err . "\n" if $err;
        print $q->h3( "Error saving your ticket." ) ;
        print $q->h3( "Please contect the helpdesk with the bellow error
message." ) ;
        print $q->h3( $err ) ;
}
else
{
        print $q->h3( "Your tiket has been successfully saved." ) ;
        print $q->h3( "Your ticket number is $id." ) ;
        print $q->h3( "Thank you." ) ;
}

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Thierry
Thelliez
Sent: Thursday, August 30, 2007 2:51 PM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Best ways to create a web based ticket
submissionwithout login?

How would you create a web form that will be used by users that do not
have an RT account?

The self service interface is simple but I need something even
simplier: users fill a form and press submit. That's all. No
authentication, No ticket list. On the form they should fill several
custom fields including a way to identify them back (name, email). The
only thing they need to see is a ticket submission page.

Behind the scene this form will populate an RT ticket for a predefined
queue and another group of users will process the requests/tickets.

How should I get started with these requirements?

Thanks,
Thierry Thelliez
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: 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



More information about the rt-users mailing list