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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

82 views 0 5
Read article

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