[rt-users] Anonymous web submission of tickets (I know... CGI...)
Andrew Xenides
andrew at staff.esc.net.au
Tue Nov 8 19:03:39 EST 2005
Cant you use the RT::Interface::CLI; perl module. You can then generate the
tickets with any values you want passed from a form...
use RT::Interface::CLI;
use RT;
RT::LoadConfig();
RT::Init();
use RT::Ticket;
use RT::CurrentUser;
my $CurrentUser = RT::Interface::CLI::GetCurrentUser();
my $ticket = new RT::Ticket($CurrentUser);
my $ticket_body = MIME::Entity->build(Data => "Body of ticket",
Type => 'text/plain');
my %ticket_vals = ( Queue => 'Queue',
Subject => 'Subject',
Owner => 'Nobody',
Requestor => "email address",
InitialPriority => '10',
FinalPriority => '30',
MIMEObj => $ticket_body,
);
my ($id, $transaction_object, $err) = $ticket->Create(%ticket_vals);
I use this all the time to create tickets from cron.
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Kyle
Altendorf
Sent: Tuesday, November 08, 2005 6:16 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Anonymous web submission of tickets (I know... CGI...)
I am looking for comments regarding a file to use as a
non-authenticated ticket creation page. I know the accepted
practice is to write a CGI script to generate an email to the rt
alias. In fact, I did write one about three years ago. Super
simple for a general script, but a bit more complicated when
considering the need to allow the user to specify values for all
the custom fields. Of course, I don't want to simply copy the
current list of options into a static page. I would like them
to be read directly from the RT database.
Does anyone have such a script already written that they would
be willing to share? I would use the one I wrote which had all
the features I need except that in my absense over the past few
years the file was lost. If I can't find one from someone else,
I guess it's time to relearn the RT API. If I get it working,
I'll be happy to share it with whomever wants a copy. Free
backup services if nothing else is how I see it, though
hopefully someone would find it useful.
thanks,
kyle
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Be sure to check out the RT Wiki at http://wiki.bestpractical.com
Buy your copy of our new book, RT Essentials, today!
Download a free sample chapter from http://rtbook.bestpractical.com
More information about the rt-users
mailing list