Background
We release major releases quarterly. Each of our Product teams works in 2-week sprints within each major release period and we're struggle to bring together all of the issues being worked on over the course of each sprint within each major release - in large part because each team names their sprints uniquely; however, each one contains the name/id of the sprint (e.g. 2024.3.1.0)
The Ask
As a potential solution, I'm trying out ScriptRunner in the hopes that it can provide the searching capabilities needed. As an example, I'm trying to surface all of the Stories that belong to a Sprint whose name contains "2024.1.1.0". This would work great as it would require no additional record-keeping from our teams and would provide a way for me to consistently stay ahead of these reports as I already know what the sprint ids will be.
I've played around with the JQL AI in ScriptRunner and haven't been able to make it work. Is something like this possible?
Hello @Dominic Fosson
Two options:
Without Scriptrunner: (reference)
project in (KPMS, FNQD) and sprint = "22024.3.1.0"
With Scriptrunner: (reference)
issueFunction in issueFieldMatch("Project in (KPMS,FNQD)", "Sprint", "2024.3.1.0")
When projects KPMS/FNQD need to be replaced with your specific ones.
Please try and let us know.
Thanks, Kalyan! I really appreciate you responding. I tried the following and it timed out due to "too many issues" (though I know there's only a handful):
issueFunction in issueFieldMatch("Project in (PD)", "Sprint", "2024.3.1.0")
I'm still learning here, but a couple follow-up questions I have are:
1. Given that I'm looking for the results to surface stories, shouldn't there be some callout in the JQL that references "stories" specifically?
2. I'm trying to work-around that the fact that sprints across our different product teams take on different naming structures (e.g. "Profile Re-design 2024.3.1.0" or "Admin Experience Catalog Work 2024.3.1.0"). They'll often start/end with different text, but they'll each contain the Sprint name ("2024.3.1.0") somewhere within them. Does the query you gave account for this "wildcard" element?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello,
If you want only stories, append additional clause:
issuetype = Story and issueFunction in issueFieldMatch("Project in (PD)", "Sprint", "2024.3.1.0")
If above is timing out, try below as well,
issuetype = Story and project in (PD) and sprint = "22024.3.1.0"
Both above queries are looking at partial string in sprint name so should be good with your criteria.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Kalyan.
The first query was valid, but timed out (again, it should only return a small handful of issues).
The second was invalid because "The operator '=' is not supported by the 'sprint' field."
If the query itself seems like it should work, maybe I just need to veer my research into overcoming these timeout issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Below is a valid query:
issuetype = Story AND project in (PD) and sprint = "22024.3.1.0"
Please retry or share what you are searching by..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah! I pasted in what you provided, but this time replaced "sprint" with the ID of the field and that did the trick! Thank you very much for your help, Kalyan!
If you'd be willing, there was one additional piece I was looking to add to build upon this.
What you provided worked brilliantly to surface all the Stories across teams that belong to a certain sprint. I'm trying to get the same view at the Initiative level. Given that Initiatives aren't themselves aligned to a specific sprint, I'm now looking to surface all the Initiatives that are parents of the Epics that are parents of the Stories belonging to a given release.
This was the query you helped me with that I ultimately ran successfully:
issuetype = Story AND project in (PD) and cf[10007] in ("2024.1.1.0", "2024.0.0.0", "2024.0.1.0", "2024.0.2.0", "2024.0.3.0")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah! I pasted in what you provided, but this time replaced "sprint" with the ID of the field and that did the trick! Thank you very much for your help, Kalyan!
If you'd be willing, there was one additional piece I was looking to add to build upon this.
What you provided worked brilliantly to surface all the Stories across teams that belong to a certain sprint. I'm trying to get the same view at the Initiative level. Given that Initiatives aren't themselves aligned to a specific sprint, I'm now looking to surface all the Initiatives that are parents of the Epics that are parents of the Stories belonging to a given release.
This was the query you helped me with that ultimately ran successfully:
issuetype = Story AND project in (PD) and cf[10007] in ("2024.1.1.0", "2024.0.0.0", "2024.0.1.0", "2024.0.2.0", "2024.0.3.0")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked! I wanted to build on this with one last thing:
We accomplished this brilliantly at the story level - can we do the same at the Initiative level?
Can we surface all the Initiatives that are parents of the Epics that are parents of the Stories that belong to a certain sprint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thats great to hear.
To get all initiatives, you will the scriptrunner add-on.
So you query will look like:
issueFunction in parentsOf('issuetype = Story AND project in (PD) and sprint = "22024.3.1.0"', "all") AND issuetype = Initiative
Please see here for documentation on this function: LINK
I am not in cloud so I havent tested this syntax.
Data center has different function. Please try and let me know if issues..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works like a charm! Thank you so much for all your help, Kalyan!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you're open to other solutions from the Atlassian Marketplace, this should be easy to do using the app that my team and I are 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. Using JXL's text filter option, you can build a view like e.g. this in just a couple of clicks:
For more sophisticated filter operations, you can also use regular expressions. I should also add that JXL can do much more than the above: From support for configurable issue hierarchies, to issue grouping by any issue field(s), sum-ups, or conditional formatting.
Any questions just let me know,
Best,
Hannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This looks incredible - appreciate you reaching out. I'm going to check it out now.
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.
Ah! I copied what you provided, but this time replaced "sprint" with the field's ID and that did the trick! Thank you very much for your help, Kalyan!
There was one additional piece I was looking to build upon by this that I haven't nailed down either - if you'd be willing to provide a bit more assistance.
This query has provided all the stories brilliantly. Now, I'm looking for a way to do the same, except to surface only the Initiatives of those Stories. Given that Initiatives aren't aren't themselves aligned with a Sprint, what would the query look like to surface just the initiatives that are the parents of Epics that are the parents of Stories that belong to a certain sprint?
This is the query that surfaced the Stories satisfactorily:
issuetype = Story AND project in (PD) and cf[10007] in ("2024.1.1.0", "2024.0.0.0", "2024.0.1.0", "2024.0.2.0", "2024.0.3.0")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.