Get child issues of epics that has a certain attribute value via JQL

Januka Wijesinghe May 31, 2021

My scenario : 

I have list of epics. One of the attributes these epcis have is "version". These epics have children issues. Children issues do not have "version" updated. Only epic has.

So what i wish to do is to write a query that will first get a list of epics that contains a specific version as value, and then list me all the child issues in the results. 

Example : show me all the child issues(stories,bugs etc) that are under epics which contains version ID 1.0.2

5 answers

1 accepted

0 votes
Answer accepted
Januka Wijesinghe June 9, 2021
  • Can be done with ScriptRunner plugin.
  • Cannot be done without external plugins.
  • Cannot be done for next gen projects
2 votes
Mohamed Adel
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.
June 1, 2021

Hi @Januka Wijesinghe  

 

I would recommend for you using JQL Search Extensions. It's a professional paid indexing service provided by a company I've partnered with.

You can use the following query to get the list of all epic children by a specific version and more reference  

issue in childrenOfEpicsInQuery("fixVersion='21.0.1'")

Thanks,

Mohamed Adel 

0 votes
Rhys Diab _Agile Docs_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 15, 2021

Hi @Januka Wijesinghe 

We put together a plugin called Agile Docs which lets you do this.

You can select your filter for Epics (ie issuetype = Epic AND fixVersion = yourRelease) and Agile Docs will bring up all Epics AND child issues of each Epic.

Here is a screenshot where I've brought up all Epics with the fixVersion Agile Docs Classic Scrum Personal:

agile-docs-v2-hero.png

Hope that helps!

Best Regards,

Rhys

0 votes
Ilze Schoeman June 1, 2021

Hi @Januka Wijesinghe 

I went on an extensive search for the same thing a little while ago and I found a solution so I thought I would share it with you here. 

Firstly, make a filter to pull out the epics which have that attribute, for example:

issuetype = Epic and fixVersion = 0.4.0

Save this filter, and take note of what this filter is called (it will have a number assigned to it which you can see in the URl when you are viewing this saved filter) e.g. filter=24123

 

Now you want to re-open a new 'search issues' window and put this into the advanced filter query (replacing the filter number with yours as well as the appropriate fix version you are searching for):

issuetype = Epic and fixVersion = 0.4.0 OR issueFunction in linkedIssuesOf("filter = 24123", "is epic of") OR issueFunction in subtasksOf("issueFunction in linkedIssuesOf('filter=24123', 'is epic of')")

What this will do is it will bring up all the epics you want to see, then it will bring up any issues linked to any of those epics directly, additionally it will bring up any subtasks of any issues which are linked to that epic directly. 

 

Let me know how you get on or if it doesn't work and I can try and help you!

Januka Wijesinghe June 1, 2021

Hi @Ilze Schoeman ,

Thank you for coming to my rescue. I tried the query you suggested and I am getting an error :

  • Field 'issueFunction' does not exist or you do not have permission to view it.

 

Does the command issueFunction require some plugin ?

Ilze Schoeman June 3, 2021

Hi, i'm not 100% sure but can you copy and paste your whole JQL query in here and i can see what it says?

Maybe a screenshot so we can see exactly at which character the issue is occurring and whether or not the query is complete

 

Thanks

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.
June 6, 2021

@Januka Wijesingheyes, it seems it comes from Script Runner Cloud.
Could you please confirm you are indeed using Jira Cloud but not have the Script Runner App installed?

https://scriptrunner-docs.connect.adaptavist.com/jiracloud/enhanced-search.html

Januka Wijesinghe June 9, 2021

@Daniel Ebers 

It seems I have ScripRunner Enhanced plugin installed, I see it on my left-hand panel menu on JIRA. So the command "issueFunction" should work in my account ? But its not. 

Ilze Schoeman June 9, 2021

Hi Januka, 

Yes I have this: 

Adaptavist ScriptRunner for JIRA

and we are on the server version of Jira. 

 

Sometimes my 'issueFunction' did not work but it was due to the way i was writing the query. Are you able to copy and paste the whole query including the error message? Then it might be easier to debug 

Januka Wijesinghe June 9, 2021

@Ilze Schoeman This is the error I get : Screen Shot 2021-06-09 at 16.03.02.png

Ilze Schoeman June 9, 2021

Hi Januka, I'm sorry I don't know how to fix that :( Apologies, I didn't realise my solution was using one of the add-ons we had already. Sorry I could not help more. 

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

@Januka Wijesinghe
according to documentation you would have to switch to the enhanced search - I cannot determine from your screenshot if you did do that.

Please have a look at this video:
https://scriptrunner-docs.connect.adaptavist.com/jiracloud/enhanced-search.html

If this should not succeed I'd encourage you to raise a request with Adaptavist.

Januka Wijesinghe June 28, 2021

@Ilze Schoeman @Daniel Ebers 

Small update on ScriptRunner based solution you suggested. 

We have included the plugin, just now saw why it did not work , issueFunction does not support next-gen projects. 

Screen Shot 2021-06-28 at 15.26.11.png

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.
June 28, 2021

Ah, I see. That is bad news indeed, at least the error message is clear on the cause.

0 votes
Rahul_RVS_Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 1, 2021

Hi @Januka Wijesinghe 

If you would be interested in a ready made solution, You may want to try out our plugin,

Agile Tools : Epic Tree & Time in Status 

You can get all the issues under the Epic for a release version, with its complete hierarchy and their progress.

Key features of Epic Hierarchy:

  • Epic Sum up - Roll up for Time estimates and Story Points
  • Excel like editing for key fields
  • Excel export of hierarchy data. Progress % on "remaining estimate" or "original estimates"
  • Support for custom names for Epic & Story fields
  • Epic Tree on Issue Screen
  • Custom field roll up

Along with Epic Sum, you also get 2 other important functionalities within the same plugin, Links Hierarchy and Multiple Time in Status reports (to track your issues).

Epic Hierarchy.PNG

Januka Wijesinghe June 2, 2021

Looks good! I will first try to see whether I can do this without external plugins and then try your plugin. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events