Hello.
How do I run a script when the value in the customfield, if the value to which the change is unknown to me.
Is that possible? Thank you in advance.
Could you give us more detail on:
I'll try to explain.
I have a drop-down list, the script should be triggered when any item.
That's how I'm trying to implement it:
log.setLevel(org.apache.log4j.Level.INFO)
log.info("Start");
IssueManager issueManager = ComponentAccessor.getIssueManager();
def change = event?.getChangeLog()?.getRelated("ChildChangeItem").find {it.field == "customfield_10200"}
if (!change) {
log.info ("Developer changed" + change.oldstring )
log.info ("Developer changed" + cchange.newstring )
}
But the mistake: java.lang.NullPointerException: Cannot get property 'oldstring' on null object
I'm doing something wrong, but I can not figure out what it was.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>the script should be triggered when any item
when any item what?
Your code is from a listener though, and it needs a tweak if I'm understanding what it's for. Try
change.get("oldstring")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.