Forums

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

JQL for all child issues of a group epics within specific fix versions

Bernardo
Contributor
March 29, 2019

We have portfolio add on

 

We would like to search for all childissues of a list of epics that are belonging to an specific fix version.

 

We are trying to use this: 

issuekey in portfolioChildrenOf("issueType = Epic AND fixVersion ~ 'DA-R3*'") 

 

What we would expect is that we get all stories and subtasks or what ever other issue type that is linked to one of the epics within one fix version DA-R3.1, DA-R3.2 

2 answers

1 accepted

5 votes
Answer accepted
Alex Christensen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2019

Hi, Bernardo - firstly, the query you're trying to use contains a ScriptRunner JQL function, and must be preceded with issueFunction instead of issuekey, like this:

issueFunction in portfolioChildrenOf("issuetype = Epic AND fixVersion ~ 'DA-R3*'")

There is also a JQL function that comes with Portfolio, but it only accepts issue keys are parameters to that function, for example (where TEST-123 is an Epic):

issue in childIssuesOf("TEST-123")

In my opinion, the best option here is to use the ScriptRunner JQL function for issuesInEpics() like in this example.

issueFunction in issuesInEpics("fixVersion ~ 'DA-R3*'")

If you have ScriptRunner installed, that last query should get you what you need. 

Bernardo
Contributor
March 29, 2019

Hi @Alex Christensen 

 

Thanks, you rule!

 

One more question around this: 

issueFunction in issuesInEpics("fixVersion ~ 'DA-R3*'")

  This one, seems to not include sub-tasks, does it? 

Like # people like this
Alex Christensen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2019

@Bernardo you're correct! That query does not. However, you should be able to do nested queries within ScriptRunner JQL functions, so this one should work for that.

issueFunction in subtasksOf("issueFunction in issuesInEpics('fixVersion ~ \"DA-R3*\"')")
Like # people like this
Alex Christensen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2019

To clarify, you should be able to combine the two queries with an OR operator to see all issues in those epics, as well as the sub-tasks of those issues in those epics. :)

Like # people like this
Nauman Ikram April 24, 2019

Is there a way find Epics only with following condition:

 

1 - I need only EPICS 

2 - EPICS STATUS != DONE    (or UNRESOLVED)

3 - EPIC's Issues has STATUS = DONE (if any of issue is not DONE, EPIC should be excluded)

Like # people like this
Alex Christensen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2019

This ScriptRunner query should work, or should at least be a starting place for you.

issuetype = Epic and resolution = Unresolved and issueFunction not in epicsOf("resolution in (Unresolved)") and issueFunction in hasLinks("is Epic of")

The and issueFunction in hasLinks("is Epic of") is needed to make sure to exclude empty Epics.

Like # people like this
Srinivaas April 15, 2023

Provide JQL without Script runner. Atalssian is failing here where third party companies are providing lot of functions and JQL's for parent child issues

1 vote
Sandra Blaschke April 28, 2023

We have the very same use case. Unfortunately ScriptRunner on Jira Cloud doesn't seem to support the suggested solutions (yet).

Not available with next-gen projects yet!

Did anyone find a solution for Jira Cloud?

Sandra Blaschke May 23, 2023

@Angelo ScandaliatoI noticed you voted for my question. We have resolved our issue now by using the following query with ScriptRunner (there's still the above mentioned error message being displayed, but it works nonetheless)

issueFunction in issuesInEpics("fixversion = "1.0.0"") OR fixversion = "1.0.0"

Angelo Scandaliato May 23, 2023

Thanks for the update. However it still does not work for me. I used this JQL in the ScriptRunner Enhanced Search.

 

issueFunction in issuesInEpics("labels = 'label_name'")

Sandra Blaschke May 30, 2023

With that query, I receive a list of issues.

Do you maybe want to describe your use case, i.e. the result you're hoping for, here in more detail?

Angelo Scandaliato May 31, 2023

The use case is clear. Now when running it says `Not available with team-managed projects yet!`

Suggest an answer

Log in or Sign up to answer