I'm making the next API request
https://host.com/rest/api/latest/search?jql=some-jql&fields=issuelinks
In the response, I have something like
"issuelinks": [
{
...
"type": {
"id": "123",
"name": "Relates",
"inward": "relates",
"outward": "relates to",
"self": "..."
},
"inwardIssue": {
"key": "KEY-123",
"self": "...",
"fields": {
"summary": "Ticket summary",
"field1": "some_other_field"
}
}
}
]
How can I control "fields" inside "issuelinks"? For example I want to display more fields. I know how to do it in the tickets returned by search, but not for tickets inside "issuelinks"
Thanks in advance
I'm fairly sure that you can't control what appears within issuelinks.
issuelinks is the highest level field and it will return whatever it believes is it's full structure. Having said that, I would have imagined that it would contain everything that you need, I'm surprised you want more detail
Hi @Warren ,
Thanks for the answer. I think you are right that there is no way to accomplish what I want. I just wanted to be sure.
The content of issuelinks is far from full and it is understandable as returning all fields of all tickets will be a performance concern. For example, in my Jira installation, there are a lot of custom fields, but they are not displayed on the ticket that is inside of issuelinks. For tickets inside issuelinks only summary, status, priority, issuetype are displayed. It is not even all not custom fields...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Surely you can get what you want from a 2 step approach?
Step 1
Run the query as you've given above, getting the issuelinks
Step 2
For each item within the issuelinks, get the KEY, then run another query to get all those fields for the given KEY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, that's how I'm doing it... but it takes jira too long to process all requests...
if we assume that each request from step 1 and step 2 takes the same time and the first request returns N tickets (with 1 issuelink each) then complexity changes from O(1) to O(N)... that is the main downside...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also tried the async two step approach.
Step 1 is a single JQL to get issues based on your prefs but the huge problem is the amount of queries in step 2 fired for each issue (id) to get ie. fields.fixVersions which can take some time. Not a great user experience and bad practice from an rest api point of view.
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.