Is there a single REST API call I can make to get all issues under the active sprint? In our "issue" objects the sprint ID is given under customfield_10021 , however I can't use that in my JQL string. I'm also unable to use something like sprint in activeSprints() as "sprint" isn't a field on the issue objects.
Do I have to get all issues in the current Sprint by querying the Sprint url, instead of the issue url ?
I am a bit confused by your question; would you please add more details?
If you are calling the REST API functions, and know the project, an issue search with JQL would return them: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get
If instead you already know the sprint, you could get the issues in the sprint with this one: https://developer.atlassian.com/cloud/jira/software/rest/api-group-sprint/#api-rest-agile-1-0-sprint-sprintid-issue-get
Kind regards,
Bill
Hi @Bill Sheboy, so the main question above was, "Is there a single REST API call I can make to get all issues under the active sprint?" From your reply, it looks like the answer is "no" and that I will need to make at least 2 REST calls - (1) to get the active Sprint ID, and (2) to get all issues under that active Sprint ID. In the second part of my post I tried to elaborate on my issue but I didn't give much detail and think all I did was add confusion lol :D Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you know the project, only one call is needed: the first one I noted with a JQL search with
project = yourProjectName AND sprint IN openSprints()
As described here: https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#openSprints--
And if you have an example issue, you have the project as it is an attribute of the issue.
Backing up a bit: what problem are you trying to solve by doing this? That is, "why do this?" That context may help a bit. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy ah ok gotcha, thank you! I was using activeSprints() instead of openSprints() , and wasn't getting any results, so using openSprints() fixed my issue. thank you!
And the "why" is I'm writing a small Python utility where I can get a list of a user's issues in the current active sprint, and allow them to create sub-tasks under those issues (for progress-report purposes).
Thanks again!
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.