Hello!
I have problem with writing a condition in Script Listener.
I have CF called "Investment" - it have 3 options: "Required", "Not required", "I am not sure".
I want to write a condition, which checks when field "Investment" is changing value from "Not required" to one of the others and then create linked issue in other project.
Now I have created listener only on "Create issue" event
Confition looks like that:
cfValues['Investment']?.value == "Required" ||
cfValues['Investment']?.value == "I am not sure"
, but I want to have when task is even edited and it have changed "Investment" value.
It is possible?
Hi
in this case you should use issue update event and get the changed fields:
List <Map> changes=event?.getChangeLog()?.getRelated("ChildChangeItem") as List
you can get the fields :
def field=change.field
and their new and old values:
change?.oldstring
change?.newstring
good luck :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.