Filtering issues in next Sprint - jira

I have the following filter to find issues in current Sprint:
resolution is EMPTY AND assignee = currentUser() AND Sprint in openSprints() ORDER BY priority DESC, created ASC
It works as expected. However, our team creates separate "sprint" (in futureSprints()) for stretch goals and I'm unable to query them without picking up the rest of the backlog. However, this stretch goal sprint is always the next one in our list. Moreover, if current sprint is called "Sprint 20-2016", the stretch goals will be called "Sprint 20-2016 Stretch Goals". This means that I can retrieve the stretch goals by grabbing the name of the current sprint. For example, the following hardcoded solution works:
resolution is EMPTY AND assignee = currentUser() AND Sprint in futureSprints() AND Sprint = "Sprint 20" ORDER BY priority DESC, created ASC
Problem is that instead of "Sprint 20" being hardcoded I want something like Sprint = [name of first entry from] openSprints() but don't know how to express this in JQL. Alternatively, since stretch goals are always in the next sprint, something like Sprint in [first entry in] openSprints() + 1 would work as well.

Adaptavist Scriptrunner adds a plethora of extra JQL functions.
One of which is nextSprint
nextSprint("Board Name")
I use it to generate statistics for our next planned 3 week sprint as well as feed a dashboard for users that complete their work early and are looking to pull issues from the next sprint into the current. Generally we pull by stack order, but with as much dynamic work as we have a dashboard gives us a bit more flexibility that a scrum board doesn't offer.

How about:
(sprint in openSprints()) AND (sprint not in futureSprints())

I wish I could find a way to reference the next 'top' of the board Sprint. However, I think if you are using a naming convention, like Stretch Goals', I would put my filter as
Sprint = Stretch Goals and sprint=futureSprint()
I tried using the word Like, but found out that it is not supported and JQL as it is does a 'Like' search. Using the FutureSprint() check you will not get

Related

No longer able to aggregate by "Sum" for Dashboard / using "Chart for Work Items"

Working on updating the Dashboard in TFS for a new sprint. I have a chart which shows a "Chart for Work Items" widget with a "Stacked area" chart of all the stories which is stacked by "state". Then, I have the stories plotted using "Aggregation" and "sum" along with "Effort". This worked in the previous sprint. For the current sprint the Configuration area doesn't show "sum" anymore just "count". Showing number of stories isn't as meaningful as number of story point (effort).
(I thought perhaps the stories on my current sprint were generated with a different template and this is what broke the query or configuration tool for the plot. But I moved a story from previous sprint and let it be the only one in the current sprint and that did not work.)
The current version of TFS I'm running is "Version 15.117.27024.0"
Previous sprint (works)
Current sprint (does not allow selecting Sum)
The problem is that you didn't select the appropriated Column Options which are available for Sum action.
Just check the query "Sprint9", make sure you have selected the columns such as: Effort, Remaining work, Completed work etc which are available for Sum action.
In VSTS Column Options aren't just what columns you see on the query page - they reflect fields can be used by the query too.
Open the Column Options menu:
Select Add Column and select field relevant, i.e, Story Points:

Jira Plan Board: filtering by label hides epics and story points

I have a Jira Scrum board and when I use the following JQL query for it, I cannot see the epics or story points in the plan board:
Team in ("Team 1", "Team 2") AND labels in (sprint8-candidate) ORDER BY Rank ASC
but if a remove the label condition, then I can see the epics and story points:
Team in ("Team 1", "Team 2") ORDER BY Rank ASC
Can anyone explain why filtering by label would hide the epics and story points?
Update: as per Barnaby's comment, I can see the Epics if I change the query to include them:
(labels in (sprint8-candidate) OR type = Epic)
But I still can't see the story points per issue:
Update #2: the story point issue was because someone in my org has set up a second story point field and I was displaying the wrong one in the board Configuration Estimation settings.
Remember that in JIRA epics are just another issue type.
The query that selects based on labels is only going to associate issues to the board that have the label in them. If the epics don't have the label then they will be excluded.
You could add the label to the epics. But I'm not sure if this would be what you want.
It may also be possible to formulate the JQL to include all epics, but just the stories that have the label.
Barnaby already explained how to display the epics as well. The fact that you don't see story points is probably because those are not displayed for just any issue type.
I think your screenshot displays features (the ones with the + icon) and bugs (the ones with the o icon), but by default only epics and stories will display story points. You can associate other issue types with estimates in story points as well. How to do this is documented here. Look for Story Points.
Estimation will be based on the number of Story Points per issue. This is the most commonly used option.
By default, the Story Points field is only available to issues of type 'Story' or 'Epic' (not 'Bugs' etc). If you want to change this, do the following:
Associate the Story Points field with other issue types, see custom field context (JIRA Admin documentation).
Specify the screens that the Story Points field should be displayed on, see Defining a screen (JIRA Admin documentation).

JIRA agile - find the total number of issues completed in each sprint

In JIRA Agile I know I can look at the sprint report to see all the issues completed in that sprint and manually count them.
I can also query for all issues completed in a particular sprint like:
project = MYPROJECT AND status = Done AND Sprint = nn
However what I want is a count of the total number of issues completed in each sprint. Is there a way to do this with JQL?
I have set up a saved filter with:
project = MYPROJECT AND status = Done AND Sprint is not EMPTY AND issuetype in (Bug, Story)
Then on my dashboard I have added a Two Dimensional Filter Statistics gadget using:
the above query
X-axis: Issue type
Y-axis: Sprint
Sort Direction: Descending - to show most recent sprints at the top
Show Totals: Yes
This is actually better than just the total I wanted as I can also see the breakdown of bugs and stories in each sprint.
You can use the JQL query:
project = PRJKEY AND Sprint is not empty
and then use the pie chart (via Export > Chart > Pie Chart) to get the numbers:
what about trying somehting like this:
project = MYPROJECT AND status = Done AND Sprint is not empty
i guess tha if the issue is added to a sprint you set this fiel up, if not it is empty. If true, this can help

Jira Agile: How to report by Epic, by Story/Parent, by Subtask?

I would like to get a summary report of my sprints and what happened with my tickets. I'd like to see aggregations by epic, then by story, with the leaf level being the subtickets on a story item.
Is there any way to do this? I Can get the particular sprint's information, but that's as far as I've gotten.
project = "ADS Agile" AND assignee = MYNAME AND resolution in (Completed, Fixed, "Cannot Reproduce", Approved, "Won't Fix", Duplicate) AND sprint = 100 AND resolution = Completed ORDER BY summary ASC, key ASC
//edit Example output;
T Key Summary Assignee P Status Resolution Created Updated Due Time Spent Original Estimate
Sub-task AGILE-35
AGILE-30 (New) Decide whether to use existing system.
Anne Normal Closed Completed 01/12/15 01/15/15 2 hours 2 hours
Story AGILE-31
As the PO of ss, I'd like tests for each path.
Anne Normal Closed Completed 01/05/15 01/29/15 1 week, 4 days, 1 minute 4 days, 4 hours
Probably the easiest way to do it would be to run the query you have now and then export it to Excel. You should be able to do the aggregation you want within Excel.
In the list of query results, select the columns you want before exporting to .csv. Easier than eliminating from Excel.
Reorder and organize the columns as you wish before the export as well.
Then save the query so that it appears as you wish.
Jira will never display the stories -under- the epic, which is very frustrating. But displaying the name of the epic link will do the trick.
Realizing that the original poster certainly figured this out a year ago, but thinking that others might have the same question.

JIRA JQL: Issues resolved in the current sprint

I would like to be able to filter for issues that are have been resolved in the current sprint. Generally this would be used to prevent issues resolved in a previous sprint but delayed in testing (not reopened) showing up when we are discussing what developers achieved this sprint.
Closed issues should also appear, but they are not a problem, as if they were closed last sprint, they wouldn't roll over into this one anyway.
In mock-JQL, it would go something like this:
project = "Project name" AND status in (resolved, closed) AND statusChanged() > startOfWeek()
I have seen startofweek() and friends, but not something like startofsprint().
We have JIRA OnDemand, so we can't install local Java add-ons.
Any way to get this information?
One way to create queries on issues that are resolved in latest sprint, is to create a filter for them.
Then you could reuse that filter in different JQLs that all need to work on subsets of that master filter.
Warning This way is little labor intensive -- nevertheless it beats other alternatives, in case you are working with multiple filters.
Create and save filter for "Closed in latest sprint" issues
status changed to (Resolved, Closed) after 2014-09-15
In other JQL-s reuse that filter
// First JQL reusing filter
project = "My Project" and status in (Resolved, Closed) and filter = "Closed in latest sprint"
// another JQL reusing filter
project = "Other Project" and assignee = currentUser() and filter = "Closed in latest sprint"
whenever you start new sprint, remember to update date in "Closed in latest sprint" filter
Indeed, as said previously, this is somewhat manual and time consuming way. But if you are in OnDemand and therefore cannot add your own JQL function that would return start date of latest sprint in defined rapidboard, then you are pretty much out of luck.
You could use the openSprint()-function.
So your query would be :
sprint in openSprints()
If you want to see issues, that are in current ongoing sprint, but haven't been in previous sprints, then you may query them like that
project = "Project Name"
AND sprint in openSprints("Project Name")
AND sprint not in closedSprints("Project Name")
Note I passed argument to closedSprints and openSprints method, this is to make your JQL run faster in larger JIRA instances. You may imagine closedSprints to resolve to a list of sprints from your entire JIRA. In case you have several projects, then sprints would be gathered from hundreds of projects and thus resulting a really long list of sprints (that are mostly irrelevant). However, once you put an argument in that method, you get nice small list of sprints, and matching issues against that is faster.
Additionally you might want to look for issues that have no sprint set
sprint IS EMPTY
But that would be just for catch the ones who work on issues, that are not in any sprint.
Sprint in (openSprints()) AND (resolutiondate > startOfWeek())
The current, rather unsatisfactory, solution is
project = "Project Name" and status changed to (Resolved, Closed) after [YYYY-MM-DD]
where the date needs to be change manually to represent the start of the current sprint.

Resources