Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Listener to comment every time fixVersion is changed

Logan Clemons
Contributor
July 10, 2019

I'm trying to make a script listener to spit out a comment every time the fixVersion is changed. Ideally, I want the comment to be something like "Old Version: v13, New Version: v14". Where I'm having is trouble is this "def change = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "Fix Version/s"}" always outputs null to change.oldline. I can't figure out how to get the previous fixversion after the change.

 

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Antoine Berry
Community Champion
July 15, 2019

Hi @Logan Clemons ,

It looks like you need to simply use 

def change = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "Fix Version"}

instead.

Antoine

Logan Clemons
Contributor
August 12, 2019

Thanks Antoine!

Like Antoine Berry likes this

Suggest an answer

Log in or Sign up to answer