Is there a way to retrieve a particular parent field?
rest/api/2/issue/ISSUE-1?fields=key,fixVersions,parent
I also want to get a field from the parent (say a custom field.)
Not in one api call.
Query for the parent from the issue, then hit the API again with the parent issue key.
I'm seeking a feature request to solve this issue. Please consider upvoting
https://jira.atlassian.com/browse/JRASERVER-71157
I am using the JIRA Cloud v3 Rest API and at least the search endpoint supports the "parent" field. Edit: But only for Task/US->Subtask and not Epic->Task/US. 😪
// see "parent" in fields: ...let searchRequest: SearchRequestBean = { jql: `project = ${projectKey}`, expand: ["renderedFields"], fields: ["key", "summary", "description", "assignee", "reporter", "watchers", "labels", "issuetype", "comment", "status", "worklog", "parent"], startAt: dlHandle.currentItemCursor, maxResults: maxResultsThisRound,};let axiosResult = await backOff(()=>{ return this.apiSearchIssues(host.baseUrl).searchForIssuesUsingJqlPost(searchRequest);},{ startingDelay: FetcherImpl.backoffStartingDelayMS, numOfAttempts: FetcherImpl.backoffRetryAttempts});
5 years later and i think this is possible now. I added "parent" into the QueryString "fields" list and got the JSON of the parent back in the response
[your-endpoint]/rest/api/2/search/?maxResults=1&fields=parent&jql=[your-jql]
Response
"fields": { "parent": { "id": "7402702" }}
It looks like you're new here. Sign in or register to get started.