Hi,
I would like to get a listener on the issue without epic link.
I don't find the way to find the epic link class.
Could you help me?
Thank you for your help.
Regards,
Mickael
Hello @Mickaël Orsolino
I am not sure of what you are asking.
If you have a Listener on an IssueEvent you will have an acces to the issue created, updated, assigned, revolved etc...
From there you can retrieve the Epic Link value this way:
import com.atlassian.jira.component.ComponentAccessor
def issue = event.issue
def customFieldManager = ComponentAccessor.customFieldManager
def epicLinkField = ComponentAccessor.customFieldManager.getCustomFieldObjectsByName('Epic Link')[0];
def epicLinkValue = issue.getCustomFieldValue(epicLinkField)
if (!epicLinkValue)
{
// Do something with issue which has no Epic Link
}
else
{
// Do something with issue which has an Epic Link
//For exemple retrieve Epic issue
def epicIssue = issueManager.getIssueObject((String)epicLinkValue)
}
Regards,
Adrien
Hi Adrien,
I try to catch each issue created without epic link. I will try your answer.
Thank you for your help.
Regards,
Mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then you should just the code I posted with a Listener on event IssueCreated
Regards,
Adrien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.