Jira server issues in search results are missing issuelinks

Cha Masek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 25, 2021

Hi,

Running Jira Server 8.5.12

We are using the Jira search API `rest/api/2/search` to get details of a task including `issuelinks` but it always returns an empty list of that field even though there are issues linked to the task. An example of the request is below

curl --request POST \
--url SERVER_URL/rest/api/2/search \
--header 'Accept: application/json' \
--header 'Authorization: xxxx' \
--header 'Content-Type: application/json' \
--data '{
"jql": "issue = ISSUE-1",
"fields": [
"assignee",
"created",
"creator",
"issuelinks",
"issuetype",
],
"expand": ["changelog"],
"maxResults": 100
}'

 

Also tried using `"fields": [*all]` with the same result.

 

What is kinda surprising is that when I use the issue endpoint `/rest/api/2/issue/{issueIdOrKey}`, the issue links are present in the response.

Wondering what could be causing that behavior if anyone has encountered that.

 

Thanks

1 answer

0 votes
Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2021

I generally use the Jira Python library and I see the same thing. The search returns issue and then I have to call that second issue REST resource to get the issue links

I looked for an expand parameter value to do this but didn't see one

Cha Masek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 27, 2021

Yeah, it is very weird. Doing the extra call isn't really a great option for us since we are querying for many issues at the same time so don't want to overload the server.

Suggest an answer

Log in or Sign up to answer