CLI issues from Web form

Hi,
I’m new to this mailing list so please forgive me if I’m a bit ignorant.
Ok, I have an issue with a web form I’m creating for our internal users.
I want to be able to allow internal users (who do not necessarily have
an account on RT)
to be able to send in a request using this form I created on our
intranet to us and automagically generate an RT Ticket.

Now here is what I do:

  • I have a form that asks for general information plus a few custom
    fields for a request that goes into a pre-specified queue
  • I wrote a CGI to handle the request utilizing the CLI modules RT has
    within its installation.
  • A ticket gets created however, none of the custom fields are
    inserted, my due-date isn’t set and I get an error on the back-end
    server:

[Wed Dec 07 14:13:51 2005] [error] [client 10.3.46.87] [Wed Dec 7
19:13:51 2005] [error]: Scrip Commit 3 died. - Compilation error at
/usr/local/perl5.8.7/lib/site_perl/5.8.7/Mail/Mailer.pm line 245.,
referer: http://intranet2.detroitk12.org/admin/is/webRequest/
[Wed Dec 07 14:13:51 2005] [error] [client 10.3.46.87]
(/opt/rt3/lib/RT/Scrip_Overlay.pm:515), referer:
http://intranet2.detroitk12.org/admin/is/webRequest/

I’ve checked my perl installation and the CPAN’d module to make sure
I’ve got the latest Mail::Mailer perl module.

Here is the code fragment I use when making the CLI call:

my $ticket = new RT::Ticket($CurrentUser);
my $ticket_body = MIME::Entity->build(Data => $body, Type => ‘text/plain’);
my %ticket_vals = ( Queue => ‘Web’,
Subject => “RT Web Request - $query->{requestSubject}”,
Owner => ‘Nobody’,
Requestor => $query->{emailAddress},
InitialPriority => $query->{priority},
FinalPriority => ‘1’,
Due => $dueDateTime,
‘FullName’ => $query->{fullName},
‘Location’ => $query->{location},
‘SiteAddress’ => $query->{siteAddress},
‘PhoneNumber’ => $query->{phoneNumber},
‘FaxNumber’ => $query->{faxNumber},
‘RequestType’ => $query->{requestType},
‘EmailAddress’ => $query->{emailAddress},
MIMEObj => $ticket_body,
);
my ($id, $transaction_object, $err) = $ticket->Create(%ticket_vals);

I ripped most of the code off of the CLIBasics chapter in the RT Documentation.

Can anyone help me please?

  • Ace Macleod -
    http://www.bandxusa.com
    "If God has a master plan. That only he understands. I hope it’s your
    eyes he’s seeing through."

CLI doesn’t support setting custom field value.
Due must be in the format of “YYYY-MM-DD HH:MM:SS”.

Ace Macleod wrote: