Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using JQL to Limit FixVersion returns

Cailin Che
Contributor
August 2, 2022

Hello!

 

We are working on setting up a new project, which will combine two previously separated teams with their own release schedules. One of our teams relies heavily on the JQL call earliestUnreleaseFixVersion() for their filtering, but now that the teams have been combined, the next fix version to be released isn't necessarily for this team. Is there a way to limit the call so that it is running only for releases that are "WCMS/TP", or some other way to tag releases so this team can continue to use the call without the interference of the other team's releases?

 

For example, we have the below releases:

WCMS/TP 4.22.8

PHIL 3.1

WCMS/TP 4.22.8.1

 

When WCMS/TP 4.22.8 is released, the next unreleased fix version will be PHIL 3.1, but we want it to return WCMS/TP 4.22.8.1

 

Thank you!

1 answer

1 accepted

0 votes
Answer accepted
Rik de Valk
Community Champion
August 2, 2022

Hi @Cailin Che ,
If I'm not mistaking, the earliestUnreleaseFixVersion function is a JQL function provided by ScriptRunner. If that is correct, you will also have the issuefunction versionMatch which allows you to filter releases using a RegEx.

That way you could at least find only relevant releases for 1 team using

fixVersion in versionMatch("^WCMS.*")

But you cannot combine that with the earliestUnreleaseFixVersion() because there is always just 1 earliest unreleased version. And if that one is not a WCMS release, you won't get any results.

So you need a different trick. Maybe you use a regular release schedule, such as once a week or once a month. If that is the case, you can use a filter on release dates.

fixVersion in versionMatch("^2022.*") AND fixVersion in releaseDate("before endOfDay(30)") and fixVersion in unreleasedVersions()
Cailin Che
Contributor
August 4, 2022

That worked, thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.22.6
TAGS
AUG Leaders

Atlassian Community Events