<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 7, 2013 at 12:13 AM, Landon <span dir="ltr"><<a href="mailto:landonstewart@gmail.com" target="_blank">landonstewart@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oh ok that's good.  So to confirm if I wish to ensure a scrip runs last I could prefix the description with "z0 Description" or "z1 Description"?  Naturally adding a number first would probably make it run before all the other scrips that start with alpha characters.  Correct?</div>
</blockquote><div><br></div><div><br></div><div style>yes, use SQL to check:</div><div style><br></div><div style>select Description from Scrips order by Description;</div><div style><br></div><div style>[RTIR] prefix is also accounted, so you have to know where DB places it while sorting.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On 6 June 2013 13:09, Ruslan Zakirov <span dir="ltr"><<a href="mailto:ruz@bestpractical.com" target="_blank">ruz@bestpractical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Jun 6, 2013 at 11:06 PM, Landon <span dir="ltr"><<a href="mailto:landonstewart@gmail.com" target="_blank">landonstewart@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>As many of you know RTIR has three levels of tickets each with their own queue.  Reports come into "Incident Reports", incidents are created in "Incidents" and investigations are created in "Investigations".  I'm attempting to write a scrip that looks at the IP field of a ticket created in "Incident Reports" and searches for tickets in "Incidents".  If it finds one (or more) it'll create a HasMember link.  If it doesn't I might make it create an Incident with the text from the Incident Report.</div>





<div><br></div><div>My question is when the scrips run the IP field appears to be empty at the time it runs.  Is this normal?  What order do things happen in RT and RTIR plugins?  Can I tweak this order to ensure that the IP Custom Field is populated via lib/RT/Action/RTIR_FindIP.pm before a scrip runs?  Is the only way to append the scrip to the end of RTIR_FindIP.pm?</div>



</div></blockquote><div><br></div></div></div><div>In RT 3.8 and 4.0 scrips are executed in order of description. You can add digital prefix to description to adjust order.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>
<div dir="ltr"><div>Thank you.</div><span><font color="#888888"><div><br></div>-- <br><div>Landon Stewart <LandonStewart@Gmail.com><br></div>
</font></span></div>
<br><br>
<br></div><span><font color="#888888">
--<br>
RT Training in Seattle, June 19-20: <a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br></font></span></blockquote></div><span><font color="#888888"><br><br clear="all">

<div><br></div>-- <br>Best regards, Ruslan.
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Landon Stewart <LandonStewart@Gmail.com><br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards, Ruslan.
</div></div>