<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Yes, that's behaving as defined. It might be possible to use a cleverer scrip to work around it, but each change to a ticket is a separate transaction.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On Apr 12, 2007, at 3:16 PM, Kenneth Crocker wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Jesse,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN>Sorry to just address this to you, but it came up in RT Users and I wanted to ask you if Stephan is correct about this. Is it possible for a user-defined scrip to be executed and an initial modification to a CF be reversed? If so, is this a bug that is corrected in 3.6.3 or what? Thanks.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Kenn</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">LBNL</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 44px; text-indent: -44px; font: normal normal normal 14px/normal Helvetica; color: rgb(0, 0, 0); min-height: 17px; "><B></B><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 44px; text-indent: -44px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>From: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">Stephen Turner <<A href="mailto:sturner@MIT.EDU">sturner@MIT.EDU</A>></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; text-indent: -40px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Date: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">April 10, 2007 9:47:46 AM EDT</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 27px; text-indent: -27px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>To: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica">Kenneth Crocker <<A href="mailto:KFCrocker@lbl.gov">KFCrocker@lbl.gov</A>>, <A href="mailto:rt-users@bestpractical.com">rt-users@bestpractical.com</A></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 61px; text-indent: -61px; "><FONT face="Helvetica" size="4" color="#000000" style="font: 14.0px Helvetica; color: #000000"><B>Subject: </B></FONT><FONT face="Helvetica" size="4" style="font: 14.0px Helvetica"><B>Re: [rt-users] Scrip question</B></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">At Monday 4/9/2007 08:13 PM, Kenneth Crocker wrote:</DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">To all,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">        </SPAN>I have a question that perhaps the longtime users of RT can answer; I am planning a series of scrips that will evaluate certain Custom Fields (which can only be modified by certain people) and based on that result and the current status of the ticket, CHANGE the current status of said ticket. This will, in essence, allow me to automate the work-flow of a ticket from request to development to QA to Implementeded to Resolved or any other stages of status I desire. My question is this,<SPAN class="Apple-converted-space">  </SPAN>when a ticket is modified does RT evaluate and attempt to execute any and all "user-defined" scrips that are applied (by either Queue or Globally) for that ticket? Thanks.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hello Kenn,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">RT will look at _all_ scrips appropriate to the ticket (queue & global) and see whether it should execute them, whether or not they have user defined code. So if you want a user-defined condition to execute only on a status change (for example) you have to code that condition in the custom condition.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Also, there's a potential trap you can get caught in when updating ticket fields in scrips - if the update that fires the scrip is triggered from a ticket update screen, the value that is shown on the screen when the submit button is pressed can override your scrip update. For example, if your ticket is open, you make an update to a custom field, and this triggers a scrip that, in custom code, changes the status to 'stalled', the sequence of events that take place may set the ticket back to what it was on the screen (ie open). I haven't found a way round this one -</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Steve<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE></DIV><BR></BODY></HTML>