In jql how use write query for sprint label which is active and print comment json objects

bindu shree December 21, 2021

Using jql  search query, the sprint label can be given as input

 http://jira.domain.com/rest/api/2/search?jql=Sprint = {sprint input},

which should be active sprint and should display the comments links in json object  from the above url displays all the json object expect comment section why and how to write jql for print the comment json object with sprint input.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 21, 2021

Hi @bindu shree 

That REST API method for a JQL search should include any comments which are in the issues.

The JQL to return issues in the current open (active) sprints would be as shown below.  Please substitute in your project name and try this in advanced search to confirm it returns what you expect, and then use it in the REST API call.

project = myProjectName AND sprint IN openSprints()

Kind regards,
Bill

bindu shree December 21, 2021

Hi @Bill Sheboy 

I don't want to add the project name, I need to pass to sprint label and should display json data of comment links

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 22, 2021

Of note...

When you call the REST API with search and JQL, do you see the comment data?  It is present when I call this for the search method with JQL.

Next, if you do not add the project to your JQL, this could return multiple sprints across different projects, and this may not be what you wanted.

Suggest an answer

Log in or Sign up to answer