[rt-users] RT Code Question

David C. Troy dave at toad.net
Tue Sep 18 18:16:07 EDT 2001


All/Jesse --

Am working on a basic XML interface to RT.  Am trying to create a ticket
as follows.  Works fine, but requestor is not set.  What am I doing wrong?

See below...

Thanks,
Dave

--snip--
    $RT::Logger->debug("Creating a new ticket");

    my @requestors = ('kermit at frog.net');
    my $linesref = "This is the text of my new, improved ticket.";
    my $queue = "hssginquiry";
    my $subject = 'My Ticket';

    require MIME::Entity;
    my $MIMEObj;
    $MIMEObj = MIME::Entity->build(Data => $linesref);

    use RT::Ticket;
    my $Ticket=new RT::Ticket($CurrentUser);
    my ($ticket, $trans, $msg) =
      $Ticket->Create(Queue => $queue,
                      Owner => $owner,
                      Status => $status || 'new' ,
                      Subject => $subject,
                      Requestors => @requestors,
                      Cc => undef,
                      AdminCc => undef,
                      Due => $due,
                      Starts => $starts,
                      Started => $started,
                      TimeLeft => $time_left,
                      Priority => $priority,
                      FinalPriority => $final_priority,
                      MIMEObj => $MIMEObj
                     );
--snip--


=====================================================================
David C. Troy   [dave at toad.net]                   410-544-6193 Sales
ToadNet - Want to go fast?                        410-544-1329 FAX
570 Ritchie Highway, Severna Park, MD 21146-2925  www.toad.net





More information about the rt-users mailing list