jql and multiple fixversion

Hi Guys, 

I have, what I'd like to think is a unique problem, I've found some references here to similar issues but they differ enough that I can't seem to extend the strategy they use to resolve my problem. 

In our JIRA project we have multiple naming conventions for fix version (no idea why) some versions adhere to this strategy eg. 3.3.34.0 and others conform to 10.3.4.5_aaa_3_4_4_9 where aaa could be any sequence of letters etc... Also, there are occasions where 1 issue could have been resolved in various of the different conventions. So management would like to get a set of issues that falls in a range conforming to the first convention. Is there a way for JIRA to pick issues that have only 1 fix version, excluding the issues that have more than 1 that do not fall in the range of specified versions? there are so many different versions it's not very practical to use "IN" and "NOT IN" 

I installed ScriptRunner and came pretty close to what I wanted but I still get some issues that should not be included

eg:

Project = TEST and fixversion in (versionMatch("^3.*")) and fixVersion >= "3.3.23.0" and fixversion < "3.4.0.0"

I got an issue that included the following in it's fix version:3.3.13.1, 10.3.9_DAS_3.4.0.10, 3.4.10.2

It makes sense that it would pick it up, but how could I go about excluding it since 3.4.10.2 is there? I cant think of any function that counts how many fixversions an issue has or excludes issues that have a fixversion outside the range.

 

Thanks and Regards, 

CAM

 

 

1 answer

I do something similar but using the Python JIRA module (which is just a wrapper to the REST API). Of course if you need this to be in the JIRA UI then this solution really won't help you. What I do is basically:

from jira.client import JIRA
jira = JIRA(server, user, pass)
results = jira.search_issues(&lt;my_jql&gt;)
for issue in results:

	valid_version_list = []
	fix_version_list = issue.fields.fixVersion
	&lt;do_your_magic_calculation_to_determine_what_versions_are_valid&gt;
	valid_version_list.append(&lt;valid_version_based_on_above&gt;)
	for version in valid_version_list
		&lt;do_some_stuff&gt;

 

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

576 views 1 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you