How can I write JQL to select all subtasks whose parents in specific version, with also parents?

Cheong sanghun March 9, 2021

Hi, What I want to do is write a jql query that,

selects every tasks in version 4.0(which is my project's specific fix version),

and also selects subtasks within it.

I need this query to select sub-tasks that isn't assigned for that version.

For example, task A's version is 4.0, and it's sub-tasks' version are not assigned, but I want to select these together.

How Can I write these JQL query?

2 answers

1 accepted

0 votes
Answer accepted
Tobias Rettensteiner March 9, 2021

Hi @Cheong sanghun

try following JQL query:
fixVersion = 4.0 OR issueFunction in subtasksOf("\"fixVersion\" = 4.0")

Please let me know if this worked for you.

Kind regards,
Tobias

Bill Sheboy
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.
March 9, 2021

Hi @Cheong sanghun and @Tobias Rettensteiner 

I believe the subtasksOf() function is only available in the purchased add-on ScriptRunner from the marketplace.

If you do not have a scripting add-on, I do not believe there is a way to perform that query with out-of-the-box Jira Cloud.

Best regards,

Bill

Like # people like this
Cheong sanghun March 9, 2021

Thanks for your comment, and @Bill Sheboy was right. I couldn't do it without additional plugin.

Tobias Rettensteiner March 9, 2021

HI @Cheong sanghun  and @Bill Sheboy

sorry my fault, I didn´t know that this needs any plugin.

Why you don´t just add the fix version to the sub-tasks too, or isn´t this an option for you?

Regards,
Tobias

Cheong sanghun March 9, 2021

@Tobias Rettensteiner Yep just changed from setting to inherit fix version from it's parent and it works! So problem solved, and again, thanks for the comments!

Like # people like this
0 votes
Zoryana Bohutska _SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 9, 2021

Hi @Cheong sanghun 

As an alternative solution, you can try Dynamic Filter (developed by my SaaSJet team). It allows you to create requests without JQL. So you can filters issues by visual composer. 

1. Create Smart Field: field - fixVersion, operator - not equal, value - version 4.0

imgpsh_fullsize_anim (9).png

2. Create Dynamic filter using issue fields (select issue type, project, etc.) and created before Smart Fieldimgpsh_fullsize_anim (10).png

Hope it helps.

Regards

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 9, 2021

Hello @Zoryana Bohutska _SaaSJet_ ,

Thanks for adding the information but also please take a moment to review the partner guidelines here.  Specifically noting the section "Identify yourself as a partner" :

Identify yourself as a partner: Make sure the user is aware you are affiliated with a partner company; for example, byplacing the name of your companyin your user name in {curly brackets} or -dashes- (note that regular brackets no longer work and have been automatically converted to dashes). If you are mentioning your own products or services, make sure you include wording to make it clear that you are affiliated with the company providing those products or services.

I see that you do appropriately indicate the affiliation to SaaSJet via your screen name and this is serving as a reminder that when offering products or services that you also "make sure you include wording to make it clear that you are affiliated with the company providing those products or services"

as an example rewording your comment as follows would be a perfect fix: 

.... As an alternative solution, The company I work for SaasJet makes the app  Dynamic Filter which you can try out ......

Regards,
Earl

Zoryana Bohutska _SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 9, 2021

Hi @Earl McCutcheon 

Ok, thank you! I will edit my comment.

Like Earl McCutcheon likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events