[rt-users] HELP with RT API
Ken Crocker
kfcrocker at lbl.gov
Thu Aug 27 14:40:07 EDT 2009
Kevin,
OK. I changed the code to this:
#------------------------------------------------------------------------------
# build ticket values
#------------------------------------------------------------------------------
%ticket_vals =
(
Subject => $ISSUE_DESCRIPTION,
MIMEObj => $mimeObj,
Creator => 4233, #API bug won't look up corresponding id for name
Owner => 4233,
Requestor => 4233,
Queue => 14,
Priority => 3,
InitialPriority => 3,
FinalPriority => 3,
Started => '2009-08-01 0:00:00',
Resolved => '2009-08021 0:00:00',
Status => ( "resolved" )
);
( $ticketid, $transaction_object, $err ) = $ticket->Create(
%ticket_vals );
# print "Open Date - ", $opened, " Resolved Date - ", $resolved;
print "New_Ticket request=", $NUMBER, " $err \n"; #debug
die "New_Ticket Error: $err \n" unless $ticketid;
return $ticketid; #Ticket.id
}
I put literal "hard-coded" values in it instead of in an object and that
didn't work either.
Still nulls in both the date fields (Started, Resolved) I'm trying to
fill and no errors.
Kenn
LBNL
On 8/27/2009 11:27 AM, Kevin Falcone wrote:
> On Thu, Aug 27, 2009 at 10:58:52AM -0700, Ken Crocker wrote:
>
>> Kevin,
>>
>> When I used "hard-coded" dates this is what I get:
>>
>
> Kenn
>
> I just wrote and ran this:
>
> my ($id, $msg) = $Ticket->Create( Queue => 'General',
> Subject => 'test manual creation',
> Started => '2009-08-01 06:10:11',
> Resolved => '2009-08-02 06:12:13',
> Created => '2009-08-01 05:00:00' );
>
> (4 hour offset caused by the internal GMTness of the API)
>
> Created: Sat Aug 01 01:00:00 2009
> Starts: Not set
> Started: Sat Aug 01 02:10:11 2009
> Last Contact: Not set
> Due: Not set
> Closed: Sun Aug 02 02:12:13 2009
>
> LastUpdated is special cased and you'll have to bludgeon it a bit with
> __Set, but you should concentrate on what your Resolved isn't working
>
> -kevin
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090827/d84f42a2/attachment.htm>
More information about the rt-users
mailing list