Forums

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

Run a script when Original estimate changes

Deleted user 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 @[deleted],

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!

Likhita May 21, 2025

Hi @Winnie _Adaptavist_

I'm trying to implement a similar functionality using Behaviours. Whenever the "Original Estimate" field changes and its value exceeds a specified limit, a warning message should be displayed. I tried using the  event change in Behaviours, but the result isn't dynamic.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events