Hi All,
I would like to know how to fetch the linked ticket details. Below is the code i am using,
public class IssueCheckPointsConfiguration extends AbstractJiraContextProvider {
@Override
public Map<String, Object> getContextMap(ApplicationUser applicationUser, JiraHelper jiraHelper) {
Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");
String currentIssueType = currentIssue.getIssueType().getName();
}
I would like to know if there is any option to get the linked ticket details from the Issue class.
Is there any way i can get the details from the database, by accessing data from some table.If so please share the table name. I could only identify "jiraissue" table which contains the issue details, but the linked issue details i am not able to get.
Please help.
HI Rahul
What is your goal? What 'details' are you looking for in a linked issue?
You can use something along these lines to run through inward or outward linked issues
import com.atlassian.jira.component.ComponentAccessor
def linkManager = ComponentAccessor.issueLinkManager
def linksListOut = linkManager.getOutwardLinks(issue.id)
def linksListIn = linkManager.getInwardLinks(issue.id)
linksListOut.each { currentLink ->
Issue destination = currentLink.getDestinationObject()
//do something with/to destination Issue
}
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.