Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sprint name isn't returned via API when using /rest/api/2/search?

jodywhite December 12, 2024 edited

I've been trying to get issue information via the rest API but sprint isn't returned as a field. I tried just searching for a sprint to get all the issues

/rest/api/2/search?jql=sprint={sprintid}

I tried only returning certain fields including Sprint:

 

/rest/api/2/search?jql=sprint={sprintid}&fields=description,issuetype,status,sprint

When I use JQL in the Jira Issue search I can search for sprint {sprintid} then customize the Column list to show Sprint.

Same thing if I search for a specific issue. It doesn't return the sprint the issue is in.

Is this expected?

1 answer

1 accepted

4 votes
Answer accepted
Marc - Devoteam
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 12, 2024

Hi @jodywhite 

Due to the fact you are using API for this, you are required to use the customfield_ID for this.

The default ID for field Sprint = customfield_10020

/rest/api/2/search?jql=sprint={sprintid}&fields=description,issuetype,status,customfield_10020

jodywhite December 12, 2024

Got it. I did see that, but I was expecting there to be a field just for Sprint. I didn't think I would have to parse through a list to get the sprint name.

After I posted this question I found this also: https://jira.atlassian.com/browse/JSWSERVER-9928.

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events