How to run a teamscript after an "Add Note" action?


Question posted 6/18/09 by Nathan Tran
Details:

Hi,
This is a follow-up question from another post, http://community.serena.com/posts/619.
I have a teamscript that I use in a post-transition context to capture any new note that is added in a transition and copies it to a field called "Latest Note" in my item. The Latest Notes field is included in a notification template so that our notifications will always include the latest notes.
Since the script is currently executed only in a post-transition context, we're failing to capture any new note that is added using "Add Note" from the Actions drop-down list. Does anyone know how to run a teamscript after a new note is added from the "Add Note" action?
I have tried running the script from a notification and that works fine. The problem is that I'd also like the notification to take the SEND EMAIL action. I thought about using the script to capture the new note and then programmatically create a notification record for the email part from within the script. But it seems to me that I would have to replicate so many different email templates in the script depending on the transition from which the note was added in order to get the correct email content.
Any help on how to run a script from an "Add Note" action is greatly appreciated.
Thanks,
Nathan


  • Comment posted 6/18/09 by Jeff Malin

    Set up a two-stage notification:
    Part One (you have already done this): write a notification-based script which detects the addition of a note.
    Part One-A - configure the notification script to set a flag in the item such as "Send E-mail" (or increment an integer variable, if this is something that may need to happen repeatedly)
    Part 2 - set up a new notification which detects the change made by the aforementioned script (flag changes to CHECKED or integer field CHANGES), and then fires off a normal e-mail type notification.