How to get the epics list from a Jira project

51 views Asked by At

So I am using the Rest API from Java with Axxios and encountered the problem that even tho I am retrieving the epics from Jira rightfully, the comments section is empty/undefined although comments are there in the epic. I use the following code for that:

this.getRestApiClient(3)
        .get(` project = ${projectIdOrKey} AND search?jql=issuetype = Epic`)
        .then(async (response) => {
          const epics: Promise<Issue[]> = Promise.all(

the Issue[] object represents each epic with its corresponding attributes e.g. issueKey, summary etc. The problem here is, that all the other attributes are not empty while the comment attribute is empty.

I already tried debugging it but I couldn“t think of other ways

1

There are 1 answers

0
Dmitry On

You need to use the second http get call to get comments for each issue.

HTTP GET

https://<jiraserver>/rest/api/2/issue/<issue_ID>/comment