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.)
Community moderators have prevented the ability to post new answers.
Not in one api call.
Query for the parent from the issue, then hit the API again with the parent issue key.
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"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm seeking a feature request to solve this issue. Please consider upvoting
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.