Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Chaining events

Jason Adam March 13, 2018

Using JIRA Core 7.6, ScriptRunner 5.2.1

I have a Script Listener that fires a RevDateUpdate event whenever it receives an Issue Updated event, with a condition of checking if the update occurred to our custom field "Review By Date".  Our conditional and event/notification schemes all seem correct.

The reason we do this is specific users (defined in another custom field) should receive only those RevDateUpdates.  And the RevDateUpdate notification uses an email template specifically to show the Review By Date changes.

However, I noticed that while the base Issue Update notifications (I turned on for testing) look correct, the emails from the RevDateUpdate aren't correctly showing what changed, and I have a feeling it's because the RevDateUpdate event doesn't know anything about what actually changed. It seems to be picking the very first change made to the issue.

Is this the best way to be handling this type of situation, or is chaining event notifications like this bad form?  Is there a way to pass information from one event to the other so that my RevDateUpdate template essentially acts like a very specific type of issue update (but still use the #changesIncludingStatus call)? 

Or am I going to need to pull out the data programmatically in my template from the changelog object to find the last occurrence of the Review By Date changes?  I'm not nearly experienced yet with velocity so that prospect is a little daunting at the moment.

 

Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events