the javadoc for com.atlassian.jira.rest.client.api.domain.Issue.getIssueLinks() says it returns issue links for this issue (possibly nothing) or null when issue links are deactivated for this JIRA instance
now, in our instance (on JIRA 7.3.3), links are enabled, and we have issues that contain links. but getIssueLinks() is returning null. i'm wondering if there's some other setting (or if i'm doing it wrong). here's my code snippet (the first branch is always invoked):
Promise<SearchResult> searchJqlPromise = jiraRestClient.getSearchClient().searchJql(this.getQuery(proj), ISSUES_PER_CALL, startAt, fieldSet);
for (Issue issue : searchJqlPromise.claim().getIssues()) {
if (null == issue.getIssueLinks()) {
System.err.println("for issue " + issue.getKey() + "; getIssueLinks() returned null");
} else {
for (IssueLink link : issue.getIssueLinks()) {
String targetKey = link.getTargetIssueKey();
System.err.println("for issue " + issue.getKey() + " there is a link with key " + targetKey);
}
}
thanks!
I was using JRJC 3.0.0 but have now found 4.0.0 exhibits the same behaviour.