Hi,
So I´m currently trying to fetch all of my epics from the project but am encountering the problem that the comments field is an empty array even tho it isn´t empty and that there are comments on the normal requested epic with the epicId.
I am using the following code:
async getEpicsByProject(projectIdOrKey: string): Promise<Issue[]> {
return new Promise((resolve, reject) => {
this.getRestApiClient(3)
.get(`search?jql=issuetype = Epic AND project = ${projectIdOrKey}`)
.then(async (response) => {
const epics: Promise<Issue[]> = Promise.all(
response.data.issues.map(async (element: JiraIssue) => ({
issueKey: element.key,
assignee: {
displayName: element.fields.assignee?.displayName,
avatarUrls: element.fields.assignee?.avatarUrls,
},
comment: element.fields.comment ?? {
comments: [],
}
subtasks: element.fields.subtasks,
created: element.fields.created,
}
}
Hi @Leon Stall
welcome to the community.
Could you tey to add the „fields“ query parameter to your call so that the response delivers all fields
this should be fields=*all according to the following docu:
Best
Stefan
Hi @Leon Stall ,
welcome to the Atlassian Community!
To be able to get issue comments, you need to use different REST API endpoint, see here
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.