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

Why don’t you want use SelfService?
It only needs registration page if you want allow user to create new accounts.On 11/7/05, Kyle Altendorf altendky@engr.orst.edu wrote:

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

Best regards, Ruslan.

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@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kyle
Altendorf
Sent: Tuesday, November 08, 2005 6:16 AM
To: rt-users@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

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@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Andrew
Xenides
Sent: Wednesday, November 09, 2005 10:34 AM
To: rt-users@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@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kyle
Altendorf
Sent: Tuesday, November 08, 2005 6:16 AM
To: rt-users@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

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

In the last few implementations of RT that I’ve worked on there has
been a need to define SLAs regarding the time taken to pick up
tickets, respond and/or resolve tickets, depending on the ticket.

The SLA’s typically are different for each RT queue, and ticket
priority. I’ve used a Custom Field representing the severity of the
ticket in the SLA definitions, although generically other Custom
Fields can also play a role in defining SLAs.

It would be ideal if RT would support the concept of presentation of
SLA triggers in the default view based on SLA considerations as above.

I would love to hear how others manage SLAs for ticket pickup
(ownership), and response/resolution.

Regards,

– Aris

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:

I may still try to convince the admins that this (SelfService)
is the best option, but they don’t particularly want the users
to be able to monitor the tickets. Nor do they want the user to
have to enter a password. Also, I don’t believe that RT
supports the option of requiring that fields be filled out.
Although we don’t want to authenticate each user, we do want to
require that they provide us with appropriate contact
information. Overall, it sounds like I’ll be rewriting the
script. I’ll be sure to post it when I get it done in case
anyone else wants to use it.

-kyle

Ruslan Zakirov wrote: