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,
}
}