please help to filter issues in current sprint

Kseniya Nesterova April 18, 2023

I need to write a filter which could support filtering issues created in current sprint only. 
I created this one, but it returns 0 results: 

project = "NAME" AND created IN ((sprint is openSprints())) ORDER BY created DESC

2 answers

1 vote
Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2023

Hello @Kseniya Nesterova 

The JQL you posted is invalid. 

  • The created field requires a date value(s), not another clause, such as what you have in parantheses
  • The "IS" operator only works when checking for the presence/absence of values
  • The "Sprint in openSprints()" will only look for issues where the sprint value has been set to a sprint that has been started but not completed.

If you want to search for issues created in the current sprint, I'd suggest:

 

project = "NAME" AND created >= {{sprint start date}} ORDER BY created DESC


Since you're taking about the current sprint, you wouldn't need to add a "created < {{sprint end date}}" as you'd be in the current sprint.

Kseniya Nesterova April 19, 2023

 

project = "NAME" AND created >= {{sprint start date}} ORDER BY created DESC

It returns me error : 


Error in the JQL Query: The character '{' is a reserved JQL character. You must enclose it in a string or use the escape '\u007b' instead. (line 1, character 31)

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hello @Kseniya Nesterova the {{}} were part of what you needed to plug in, I should have clarified. Your query may look something like:

 

project = "NAME" and created >= "2023-04-18"

Like Kseniya Nesterova likes this
Kseniya Nesterova April 19, 2023

Thanks, so there is no way currently to make this filter work on something like beginning of activeSprint() 
And will require manual update for each sprint moving forward.

For a reference: 
https://jira.atlassian.com/browse/JRACLOUD-72007

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.
April 19, 2023

Hi @Kseniya Nesterova 

As described by @Sam Nadarajan there is no built-in way to do such a query.  There are probably marketplace addons to support such queries.

What problem are you trying to solve by doing this, and how often do you need to solve this problem?  Knowing that will help the community to offer suggestions.

For example, some possibilities are...

  • Let's assume a team notices they are adding things after the sprint starts.  The team could look at the built-in sprint report to see what was added, and discuss that at the retrospective, considering how to improve sprint planning, focus on planned work, reducing unplanned work, etc.
    • If you wanted to preserve the condition (adding to active sprint) longer, automation rules could be used to detect this.
  • Or...let's assume this is work supporting a project and you want to track scope change.  That could either be done with the sprint report or the release reports to see what is happening.
  • Etc.

Kind regards,
Bill

Kseniya Nesterova April 19, 2023

Hi Bill, thank you for your comment here. I am working on Dashboard for active sprint and would like to get updated information there every time I open it. 

For some of the cases / custom filters that works - using // sprint is openSprints()//
but there is a case there I need to be able to filter Issues in JIRA in = Active sprint time frame. 


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.
April 20, 2023

Please take a look at the built-in Sprint Health Gadget. If you add that to dashboard, it will show the scope change during the sprint...and if you click on that value the Sprint Report will display showing the changes.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events