Hi there,
I’m trying to retrieve the issue links making a rest call to Jira Server (not Cloud), but without success.
This call doesn’t return the “issuelinks” data:
/rest/api/2/issue/{issueIdOrKey}
No expand option available like:
/rest/api/2/issue/{issueIdOrKey}?expand=issuelinks
The “fields” option doesn’t work either:
/rest/api/2/issue/{issueIdOrKey}?fields=issuelinks
It’s strange because there’s available a call for remote links but not for issue links:
/rest/api/2/issue/{issueIdOrKey}/remotelink
Any suggestion would be appreciated.
Thanks
Hi Carlos,
Your first API returns me issue linking info in response (“issuelinks” attribue).
But only if there is Issue linking enabled on Jira instance (check it in Jira administration -> Issues -> Issue linking). It could be reason.
And are you sure there is any issue link to your issue?
Kind Regards
Josef Pavelec, Morosystems
Hi Josef,
Thank you for your response.
My instace has enabled the Issue Linking at Administration settings, and still not receiveng the “issuelinks” when I do the rest call to the issue…
Which version of Jira are you running?
I’m on the lastest ones: Tested in 8.9 and 8.14
Best Regards
Hi Carlos,
I tried it on older Jira version (7.6.8) but I turn another Jira (version 8.14) on with same result.
Unfortunatelly, I don’t have any other hint for you. I would ask Atlassian support for help.
Best Regards
Josef Pavelec
Doesn’t matter.
Finally, I built a REST endpoint to retrieve the issuelinks.
Thanks for your time
Hi Carlos,
I’m trying to do the same thing but I’m using python and the module https://atlassian-python-api.readthedocs.io/.
The thing is that the method provided by the module to get the issuelinks doesn’t bring all the issuelinks only one. Don’t know if you have cases where one issue is linked to more than one, if so, how did you manage to get all the linkedissues for all the issues?
Thanks
Hi ignaci0s,
I’ve been going through the python module api you’re using, and it’s quite basic.
I don’t think you can retrieve the all the linked issues.
What I ended up using is the Java api for Jira, thanks to my app is installed as a plugin inside the Jira instance. It’s not an external app acting as a client.
issueLinkManager.getLinkCollection(issue, jiraAuthenticationContext.getLoggedInUser());
Here is the reference for this manager: IssueLinkManager (Atlassian JIRA 7.2.1 API)
Hope this helps