Hi,
Getting below error at line . Please help
List listLinkEpics = issueLinkManager.getOutwardLinks(epicIssue.getId());
groovy.lang.MissingPropertyException: No such property: issueLinkManager for class: script1592379359056136729314
package com.starhome.jira;
import com.atlassian.jira.issue.*;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.link.IssueLink;
import com.atlassian.jira.issue.link.IssueLinkManager;
import com.atlassian.jira.issue.issuetype.IssueType;
import java.util.*;
def String[] LEGAL_SUB_EPIC_LINKS = ["Story", "Defect", "Bug", "Query/Clarification"]
List legalIssues = Arrays.asList(LEGAL_SUB_EPIC_LINKS);
IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager();
String GetRMIDKeyfromEpic(Issue epicIssue)
{
List listLinkEpics = issueLinkManager.getOutwardLinks(epicIssue.getId());
//List listLinkEpics = EpicIssue.get("issuelinks");
Issue issueRMID = null;
for( int i = 0; i < listLinkEpics.size() ; i++ )
{
IssueLink LinkEpic = listLinkEpics.get(i);
if (LinkEpic.getIssueLinkType().getName().equalsIgnoreCase("Include"))
{
issueRMID = LinkEpic.getDestinationObject();
}
}
if (issueRMID == null)
{
return "Roadmap Item at Epic level is empty";
}
else
{
return issueRMID.getKey();
}
};
String isIssuetype = issue.get("issuetype").getName();
if (isIssuetype.equalsIgnoreCase("Epic"))
{
return GetRMIDKeyfromEpic(issue.getIssueObject());
Just move "IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager();" inside the scope of your function :)
Thanks mathis :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gunti_Reddy You are welcome! Can i get you to accept my answer? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gunti_Reddy Thank you!
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.