Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,677
Community Members
 
Community Events
184
Community Groups

Jira JQL query to return all items with 2 or more sprint values

As a scrum master I want to see a report on items that have carried over from one sprint to another so that I can coach the team on user story estimation.

 

Acceptance Criteria:

A JQL query that returns all items that have a sprint value great than or equal to 2.

I have a query that gets me close to what I want, but it doesn't quite return everything I'm looking for. 

project = "Project Name" AND issuetype not in ("Sub Test Execution", Subtask) AND sprint is not EMPTY AND sprint in closedSprints() AND sprint in openSprints()

This will only return items that have more than one sprint value, and are in the active sprint. I want to also see items that were in two closed sprints.

1 answer

2 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 22, 2023

There is not function in JQL that would allow you to do do this, and I don't think any of the apps that extends JQL has a feature for it either. What you could do is have a custom field that keeps track on the number of sprints the issue has been in and then have an automation that updates that field every time a new sprint is started.

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.
Mar 22, 2023

Hi @Ryley Fischer 

Yes, and...to Mikael's answer:

If you decide to add the custom field and add an automation rule, you can run this for issues from prior sprints to determine if this is an older symptom or a newer one. 

For example...

  • trigger: scheduled (e.g., every hour), with JQL to find issues in your project where the custom field is empty and the issue is done/resolved
    • project = myProjectName AND myCustomField IS EMPTY AND statusCategory = Done
  • action: update your field with {{issue.sprints.count|0}}

A rule like this will process 100 issues at a time and then stop.  It will keep triggering until there are no more issues to process, and then you can disable it...or leave it enabled to handle as sprints complete.

And for a symptom like this which is hopefully a temporary condition, you can stop using the rule and custom field once the team improves how they plan, focus, deliver, etc. and reduce carry-over.

Kind regards,
Bill

Like Mikael Sandberg likes this
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Mar 24, 2023

Hi @Ryley Fischer

if you're open to solutions from the Atlassian Marketplace, this would be easy to do in the app that my team is working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of so-called "smart columns" that aren't natively available, including the number of sprints (along with many other sprint-related columns).

This is how it looks in action:

number-of-sprints.gif

As you can see above, you can easily sort and filter by this field, and also use it among JXL's many advanced features, such as issue grouping, sum ups, or conditional formatting. Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

Note that this "just works" - there's no scripting or automation whatsoever required.

Any questions just let me know,

Best,

Hannes

Like Mikael Sandberg likes this

Suggest an answer

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

Atlassian Community Events