Run a script when Original estimate changes

Laura Alonso May 10, 2022

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

0 votes
Winnie _Adaptavist_ May 14, 2022

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