[rt-users] Scrip question

Kenneth Crocker KFCrocker at lbl.gov
Tue Apr 10 18:30:45 EDT 2007

Karen, Borut, & Stephan,

	Thank you all for your replies. My intent is that once a person has 
already updated a CF, RT would recognise that a transaction has occurred 
against the ticket and my user-defined condition would execute, which 
would modify the ticket status field only. It's crucial to my design. 
Actually, if the CF goes back to it's previous setting, I won't really 
care as long as the status change takes place. I was also thinking of 
using this method for approvals (modify status to "rq apprvd") because I 
think it is less cumbersome than the delivered version (I can more 
easily control the effect). Thanks again.


Karen Nyenhuis wrote:
> Have you tried setting the scrip stage to TransactionBatch?   The scrip 
> will then get triggered only once after all transactions have been 
> generated.  You then have to iterate over all the transactions to look 
> for your condition.  There is an example in the RT Essentials book.
>> Stephen Turner wrote:
>>> > 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 -
>> This just bit me today. I have a scrip that changes a custom field on
>> owner change. When user gives away a ticket from /Ticket/Modify.html,
>> there's also the current value of said custom field selected.
>> What happens is that the scrip changes the value of the custom field
>> just to have it set back in the next transaction.
>> This of course doesn't happen if I change the owner in the
>> ModifyPeople.html, but I don't think I am able to educate my users...
>> I really hope there is a solution to this that does not involve
>> modifying RT. If not, I'll just disable the owner update from
>> Modify.html. But that is, to put it mildly, crude.
>> Any ideas?
>> regards,
>> Borut Mrak.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy 
> a copy at http://rtbook.bestpractical.com

More information about the rt-users mailing list