A JQL query that will pull stories assigned to a fix version within a given time period

Trixie Johnson April 19, 2024

I am researching how to write a query that will retrieve stories assigned to fixversions in a given time period. 

I see many options presented in other posts and in online documentation, but they just throw errors back.

For instance, Scriptrunner documentation offers the following:

fixVersion in releaseDate("after now() before 10d")

However, when I use it, I get an error: Unable to find JQL function 'releaseDate("after now() before 10d")

Also saw this suggested:

fixversion in releaseDate('after startOfYear()') AND fixversion in releaseDate('before startOfYear(90d)') to retrieve Q1 data. This too does not work.

Please advise on any options to solve this need.  Thanks!

2 answers

0 votes
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.
April 22, 2024

Hi @Trixie Johnson

if I understand you correctly, you want to filter based on the release date of the issue's fix version(s) - is this about right?

If you're open to solutions from the Atlassian Marketplace, this would 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. It also comes with a long list of so-called smart columns that aren’t natively available, including the fix version release date, along with many other version-related columns.

This is how it looks in action:

fix-version-release-date.gif

As you can see above, you can easily sort and filter by the fix version release date; you can also use it across JXL's advanced features, such as support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting.

Any questions just let me know,

Best,

Hannes

0 votes
Kalyan Sattaluri
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, 2024

Hello @Trixie Johnson 

fixVersion in releaseDate("after now() before 10d")  gives me issues assigned to fix version with release date in next 10 days. If you are getting that error, are you sure you have scriptrunner installed?

Trixie Johnson April 19, 2024

Yes, as I use it often.

We are on Jira Cloud. I'm told our ScriptRunner version is current.

Trixie Johnson April 19, 2024

@Kalyan Sattaluri Do you use Jira Data Center?  If so, is there any workaround for Jira Cloud?

Kalyan Sattaluri
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, 2024

Ah, Apologies. I am in Data center version. Reviewing the comparisions, looks like Versions functionality is not available in Cloud's version of scriptrunner..

https://docs.adaptavist.com/sr4jc/latest/differences-between-scriptrunner-for-jira-server-and-jira-cloud/jql-query-comparison-with-scriptrunner-for-jira-server

Kalyan Sattaluri
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, 2024

No, I personally cant think of any options we can use natively to search for a time frame based on fixversions dates. But I am surprised Cloud's Scriptrunner does not have it.. Unless there is a different way in Cloud..

Maybe community familiar with Cloud's scriptrunner can suggest. *fingers crossed*

Like Trixie Johnson likes this

Suggest an answer

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

Atlassian Community Events