<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kevin,<br>
<br>
When I used "hard-coded" dates this is what I get:<br>
<br>
-bash-3.00$ ./RT-TravelConversion.pl <br>
Use of uninitialized value in concatenation (.) or string at
/apps/rt/rt-3.6.4/etc/RT_SiteConfig.pm line 35.<br>
Use of uninitialized value in concatenation (.) or string at
/apps/rt/rt-3.6.4/etc/RT_SiteConfig.pm line 47.<br>
Use of uninitialized value in concatenation (.) or string at
/apps/rt/rt-3.6.4/etc/RT_SiteConfig.pm line 47.<br>
Subroutine Connect redefined at /apps/rt/rt/lib/RT/Handle_Local.pm line
90.<br>
Subroutine BuildDSN redefined at /apps/rt/rt/lib/RT/Handle_Local.pm
line 121.<br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=1 Ticket 87299 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=2 Ticket 87300 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=4 Ticket 87301 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=5 Ticket 87302 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=5 Ticket 87303 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=5 Ticket 87304 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=5 Ticket 87305 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=6 Ticket 87306 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=7 Ticket 87307 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=8 Ticket 87308 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=9 Ticket 87309 created in queue 'FS-Travel' <br>
Open Date - 2009-08-27 0:00:00 Resolved Date - 2009-08-01
0:00:00New_Ticket request=10 Ticket 87310 created in queue 'FS-Travel' <br>
-bash-3.00$ <br>
<br>
The relevant code was:<br>
<br>
# Set Dates<br>
$opened = '2009-08-27 0:00:00';<br>
$resolved = '2009-08-01 0:00:00';<br>
<br>
AND<br>
<br>
%ticket_vals =<br>
(<br>
Subject => $ISSUE_DESCRIPTION,<br>
MIMEObj => $mimeObj,<br>
Creator => 4233, #API bug won't look up corresponding id
for name<br>
Owner => 4233,<br>
Requestor => 4233,<br>
Queue => 14,<br>
Priority => 3,<br>
InitialPriority => 3,<br>
FinalPriority => 3,<br>
Started => $opened,<br>
Resolved => $resolved,<br>
Status => ( "resolved" )<br>
);<br>
<br>
( $ticketid, $transaction_object, $err ) = $ticket->Create(
%ticket_vals );<br>
print "Open Date - ", $opened, " Resolved Date - ", $resolved;<br>
print "New_Ticket request=", $NUMBER, " $err \n"; #debug<br>
die "New_Ticket Error: $err \n" unless $ticketid;<br>
<br>
The resulting tickets had nothing in the two date fields I was trying
to set and the current date in "Created" & "LastUpdated". In my
code, you can see I "hard-coded" a date/time and it displayed from
$opened & $resolved, yet nothing in the record.<br>
<br>
I don't know what you mean by "warning out". Do you mean just not put
anything in the fields with code?<br>
<br>
Kenn<br>
LBNL<br>
<br>
On 8/27/2009 9:18 AM, Kevin Falcone wrote:
<blockquote cite="mid:20090827161836.GH806@jibsheet.com" type="cite">
<pre wrap="">On Thu, Aug 27, 2009 at 08:52:21AM -0700, Ken Crocker wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> Kevin,
My log has been on and it gives no errors. This is it (for a small file for testing):
-bash-3.00$ ./RT-TravelConversion.pl
Use of uninitialized value in concatenation (.) or string at
/apps/rt/rt-3.6.4/etc/RT_SiteConfig.pm line 35.
Use of uninitialized value in concatenation (.) or string at
/apps/rt/rt-3.6.4/etc/RT_SiteConfig.pm line 47.
Use of uninitialized value in concatenation (.) or string at
/apps/rt/rt-3.6.4/etc/RT_SiteConfig.pm line 47.
Subroutine Connect redefined at /apps/rt/rt/lib/RT/Handle_Local.pm line 90.
Subroutine BuildDSN redefined at /apps/rt/rt/lib/RT/Handle_Local.pm line 121.
New_Ticket request=1 Ticket 87287 created in queue 'FS-Travel'
New_Ticket request=2 Ticket 87288 created in queue 'FS-Travel'
New_Ticket request=4 Ticket 87289 created in queue 'FS-Travel'
New_Ticket request=5 Ticket 87290 created in queue 'FS-Travel'
New_Ticket request=5 Ticket 87291 created in queue 'FS-Travel'
New_Ticket request=5 Ticket 87292 created in queue 'FS-Travel'
New_Ticket request=5 Ticket 87293 created in queue 'FS-Travel'
New_Ticket request=6 Ticket 87294 created in queue 'FS-Travel'
New_Ticket request=7 Ticket 87295 created in queue 'FS-Travel'
New_Ticket request=8 Ticket 87296 created in queue 'FS-Travel'
New_Ticket request=9 Ticket 87297 created in queue 'FS-Travel'
New_Ticket request=10 Ticket 87298 created in queue 'FS-Travel'
-bash-3.00$
Nothing in those messages syas I have a code problem or anything. You have the code (attached
in last note). The code seems simple enough, I just can't seem to see the problem.
</pre>
</blockquote>
<pre wrap=""><!---->
Kenn
What happened when you started warning out your data and the converted
data that you're handing to Create? What happened when you modified
your code to use a hardcoded date in a known-good format? (As
suggested in my response)
</pre>
<blockquote type="cite">
<pre wrap=""> You're not providing any data or logging or error messages
I suggest you warn out the original date, the processed date, the ISO
date and turn your debugging logs on. You also probably want to start
by getting ticket Create working with hardcoded date strings and then
move on to processing your data.
</pre>
</blockquote>
<pre wrap=""><!---->
-kevin
_______________________________________________
<a class="moz-txt-link-freetext" href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a>
Community help: <a class="moz-txt-link-freetext" href="http://wiki.bestpractical.com">http://wiki.bestpractical.com</a>
Commercial support: <a class="moz-txt-link-abbreviated" href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at <a class="moz-txt-link-freetext" href="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</a>
</pre>
</blockquote>
</body>
</html>