[rt-users] Order of transactions

Kenneth Crocker KFCrocker at lbl.gov
Wed Apr 4 15:35:21 EDT 2007


Gene,


	Why don't you put some code in the IP E_mail template to grab the 
transaction value?


Kenn
LBNL

Gene LeDuc wrote:
> Hi All,
> 
> I saw a post with a similar issue a while ago, but the solutions offered 
> don't fit my situation.
> 
> I have 2 custom fields, IP and State.  IP is a single value text field 
> and State is a single value combo box.
> 
> I'm modifying both values using the Basics tab of the Ticket screen.  I 
> set IP to some value and State to some value via the pulldown menu, then 
> click "Save Changes".
> 
> My expectation is that both values would be modified before any scrips 
> are triggered.
> 
> However...  It appears that RT modifies State first, which fires a 
> custom-condition "State Change" scrip.  IP then gets modified only after 
> the scrip fires, so it is not available to a template used by the "State 
> Change" scrip.  The problem is that I need the IP in order to send out 
> an e-mail that makes sense.
> 
> The History display shows the State being changed, then the actions of 
> the "State Change" scrip (a queue change and the e-mail), then the IP 
> value being set.
> 
> Is there a way I can hold off on the "State Change" scrip until after 
> both values have been changed in the Basics screen?
> 
> It's not a "scrip execution order" issue, because there's only 1 scrip 
> involved.  The issue is that I need all of the updates from the web page 
> to happen before any scrips are triggered.
> 
> I can work around this if I make the changes in 2 steps (change IP then 
> change State), but I'm sure my users won't see the logic in doing this.
> 
> I thought about adding a condition to the "State Change" scrip that 
> makes sure that IP is not null.  That would keep the e-mail from going 
> out with a null IP, but then the scrip condition would not be satisfied 
> when the IP value does finally gets modified.
> 
> Has anyone else conquered this issue?  Or am I missing something pretty 
> basic?
> 
> Thanks,
> Gene
> 
> 
> 



More information about the rt-users mailing list