Forums

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

jql filter for tickets with "Affected versions" in "Fix versions" of subquery

Liudvikas R. February 7, 2021

JQL should like this:
AffectedVersion in FixVersionsOf(subquery)

Real example:
AffectedVersion in FixVersionsOf('Labels=xx')

In Back-End final would be:
AffectedVersion in (AAA, BBB)
firefox_KITtmDn2WE.png

Anybody have any idea its possible with ScriptRunner or other way?

Thanks for any help. ;)

3 answers

0 votes
Daniel Ebers
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.
February 8, 2021

Hi @Liudvikas R.

could you please confirm on the whole picture, please?
The issues in 1) won't show Affects Version/s as they do not have the value assigned to it if I understand your picture correctly.

A query to both Affects Version/s and Fix Version/s I was able to form like the following (on top added labels):

affectedVersion IN versionMatches("27.4") AND fixVersion IN versionMatches("29.0") AND labels = Test

But this is probably not fully what you want.

Could you please explain the intention a bit further?

Regards,
Daniel

Liudvikas R. February 9, 2021

Hi, @Daniel Ebers ,

Yes, you understand correctly, These tickets(1) dont have affectedVversions and I dont need these ticket in my final list. These tickets are important only for Gather FixVersions.

I tried to explain, more detailed in my previous answer for Moga.

Thanks! Liudvikas

Daniel Ebers
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.
February 10, 2021

For the affectedVersion you seem to be able to refer to version numbers, also regular expression but not to combine it with labels as such.

Did you give my query a try? You can use wildcards instead of a specific version as "27.4" which would lower the burden of writing many affected versions one after all.

0 votes
mogavenasan
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.
February 7, 2021

Hi @Liudvikas R.,

Not sure the end result should be the one with the Fix Version or Affected Version. However, there's an Atlassian KB documenting on How to find issues with a specific Fix Version/Affected Version using database query.

I hope that this helps.

Thanks,
Moga

Liudvikas R. February 9, 2021

Hi, @mogavenasan . Result should be with AffectedVersions(but a lot of them).

I want to create all bug list with versions was given to unique clients(labels)

Instead of writing in JQL  so many Affected versions.

1) I want just write client name(Label) in JQL Query .
AffectedVersion in FixVersionsOf('Labels=xx')
2) Then Script should gather all versions was given by fix version.
AffectedVersion in FixVersionsOf('Labels=xx')
3) And finally create a list with all bugs with AffectedVersions.
AffectedVersion in FixVersionsOf('Labels=xx')
One version gets not only one client. So if unique client not found that bug its not meaning that unique bug not existing for that client.


Thanks! Liudvikas

mogavenasan
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.
February 11, 2021

Hi @Liudvikas R.,

I can see that you are trying to link those affected tickets to the fixed tickets.

About the JQL, I'm pretty sure we will need to write some sort of custom JQL function using Scriptrunner.

So I was playing around with Script Fields, I'm not entirely sure if you would like this approach:

The field Fixed by:
image.png

Sample data:
image.png

This is completely a different approach to what you are looking for here. Do let me know if this somehow good enough for you, I will share the steps to configure this field.

Note: You will need Scriptrunner in order to do this.

Thanks,
Moga

0 votes
John Funk
Community Champion
February 7, 2021

Hi @Liudvikas R.  - Welcome to the Atlassian Community!

I have been seeing some other problems in the last couple of days with the Fix Versions field. If you don't get some help soon here in the community, I would open a support ticket with Atlassian.

https://support.atlassian.com/contact/#/

John Funk
Community Champion
February 8, 2021

Here is the bug that was posted for Jira Cloud: 

https://jira.atlassian.com/browse/JRACLOUD-75982

But it might be the same problem for Server. You should definitely put in a support ticket. 

Suggest an answer

Log in or Sign up to answer