CLI issues from Web form

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

[Wed Dec 07 14:13:51 2005] [error] [client] [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/ line 245.,
[Wed Dec 07 14:13:51 2005] [error] [client]
(/opt/rt3/lib/RT/, referer:

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 -
    “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: