The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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.