Forums

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

How do I get Issue object for a CustomField listener?

Steven Cook
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2024

I've created a Listener against a custom field.  Most examples indicate you can use:

Issue myIssue = event.getIssue()

def issueKey = myIssue.getKey()

This results in an error that getIssue() isnt a class member.  I suspect this is because for a Custom Field 'event' is not a standard Event type but something like a CustomFieldChangedEvent (may not be exactly correct) and the list of class members that pop up why I try to use event object doesn't include a 'getIssue()' member,

Any ideas?

 

1 answer

0 votes
Nicolas Grossi
Banned
August 1, 2024

which is your data center version ? App client is java ?

 

Steven Cook
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2024

I didn't provide enough details! This is related to creating a Groovy listener within ScriptRunner.  Have a custom data field I've added a ScriptRunner listener to.

I'll have to go back into the lab to check data center version.

 

 

Suggest an answer

Log in or Sign up to answer