I have a scrip that does the same thing and I ran into the same problem.
This is how I resolved the issue:
- Make sure your RT_SiteConfig.pm file has “TransactionBatch” turned on
- Put all the code to change other fields, etc. in the “Prep Code” area
- Put the code to change Queues in the “Cleanup Code” area.
- Created a second scrip (to notify the AdminCc) that uses the same
Condition as the first, but name it so that it will execute after the first
I name all my Notification scrips with “Notify …” but name all my other
scrips (those that change CF’s, ticket data, etc.) with a 1a thru 1d as a
prefix. RT executes scrips in sequence by name.
Hope this helps.
LBNLOn Thu, Sep 8, 2011 at 9:46 AM, Christopher Lasater CLasater@taleo.comwrote:
I have a queue scrip set up so that if a specific custom field is selected
the ticket’s Queue will be changed to another Queue. This seems to be
working well, but when the ticket is created the Scrip for Notify AdminCC on
create does not seem to be using the new Queue’s AdminCC. I have checked
the debug logs and the queue changing scrip runs before the Notify AdminCC
scrip and after everything is done, the AdminCC’s are correct, its just that
the change is not finalized till all the Scrips are run. ****
Is there a way to commit the change at the end of a scrip? Or a way to get
RT Training Sessions (http://bestpractical.com/services/training.html)
- Chicago, IL, USA — September 26 & 27, 2011
- San Francisco, CA, USA — October 18 & 19, 2011
- Washington DC, USA — October 31 & November 1, 2011
- Melbourne VIC, Australia — November 28 & 29, 2011
- Barcelona, Spain — November 28 & 29, 2011