Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,608
Community Members
 
Community Events
165
Community Groups

Run a script when Original estimate changes

Hello,

I need to create a listener with ScriptRunner that only run when the "Original estimate" field change. I have tried to control it with the changelog, as I do with the custom fields, but with this field it doesn't work. This is the code I have tried.

def creacionChangeOriginalEstimate = changelog?.items.find {it['field'] == 'Original estimate'}

Is there any way to control that the code run only if the Original estimate field changes?

Thanks!

1 answer

Hi @Laura Alonso,

To check if it was the Original Estimate field that changed,

def change = event.changeLog?.getRelated("ChildChangeItem")?.find { it.field == "timeoriginalestimate" }

I hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you