<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Date format to set Due Date with scrip?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Hi,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">The config setting</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">‘</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Requests should be due in:</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"> is not working</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">, so</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">I</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">m trying to write a scrip to set the DueDate on ticket creation.</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">I</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">m on RT v3.6.2 and don</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">t want</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">to upgrade just</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">for this issue.</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Following advice on the wiki I</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">ve got the following</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Condition:</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb">     </SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">On Create</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Action:</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb">         <FONT SIZE=2 FACE="Arial">user defined</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Template:       Global template: blank</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Custom action prep code:        1;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Custom action cleanup code:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Courier New">use Date::Calc qw(:all);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Courier New">($year,$month,$day) = Today([$gmt]);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Courier New">($year2,$month2,$day2) = Add_Delta_Days($year,$month,$day,"7");</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Courier New">$string = Date_to_Text($year2,$month2,$day2);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Courier New">$lower = ISO_LC($string);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Courier New">$self->TicketObj->SetDue($lower);</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Due Date is not set though</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT FACE="Wingdings" SIZE=2>L</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Running this on command line</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">,</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Courier New">$lower</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">prints</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"> a date formatted as</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Arial">‘</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">thu 27-may-2010</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">I can hack around with the date format if someone can tell me what it should be so that RT will accept it in</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">to</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"> the database</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial"> (postgres).</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Thanks</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Steve</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN><A NAME=""><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Dr Steven Platt</FONT></SPAN></A></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Bioinformatician</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Health Protection Agency</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Centre for Infections</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">London</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN><A HREF="http://www.hpa.org.uk/bioinformatics"><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><U></U></SPAN><U><SPAN LANG="en-gb"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">www.hpa.org.uk/bioinformatics</FONT></SPAN></U><SPAN LANG="en-gb"></SPAN></A><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-gb"></SPAN></P>

</BODY>
</HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
**************************************************************************
The information contained in the EMail and any attachments is confidential and intended solely and for the attention and use of the named addressee(s). It may not be disclosed to any other person without the express authority of the HPA, or the intended recipient, or both. If you are not the intended recipient, you must not disclose, copy, distribute or retain this message or any part of it. This footnote also confirms that this EMail has been swept for computer viruses, but please re-sweep any attachments before opening or saving. HTTP://www.HPA.org.uk **************************************************************************
</STRONG></P></BODY></HTML>