[rt-users] Anonymous web submission of tickets (I know... CGI...)

Kyle Altendorf altendky at engr.orst.edu
Mon Nov 14 14:29:18 EST 2005


The issue is not ticket generation, this is quite simple through 
the mailgate (though other options may turn out to be even 
simpler).  It's more the setup to provide the user with all of 
the options from the custom fields with appropriate selection 
options (multiple vs single), list vs text box...  Honestly, I 
was hoping to be lazy and just leech off of someone elses work. 
  No such luck, so it's back to vi.

-kyle

Andrew Xenides wrote:
> Now, if I read the full post I would have seen that you are using custom
> fields. I have never worked with custom fields, but im sure this could be
> used to insert to custom fields, and even get the custom fields for form
> entry.
> 
> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com
> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Andrew
> Xenides
> Sent: Wednesday, November 09, 2005 10:34 AM
> To: rt-users at lists.bestpractical.com
> Subject: RE: [rt-users] Anonymous web submission of tickets (I know...
> CGI...)
> 
> 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



More information about the rt-users mailing list