How to implement the issueFunction in ChildrenOf("") feature of Jira Cloud in Jira DC?

vincenzo_spatafora May 2, 2024

Dear ALL,

there is a very powerful function called 'issueFunction in ChildrenOf("")' to which you can even pass as input the name of a saved filter.

I understand this is only available in Jira Cloud and my question is:

is there a way to implement its functionality on the Jira Data Center (I use version 9.12.5).

Thanks in advance,

Vincenzo.  

1 answer

1 accepted

1 vote
Answer accepted
Matt Parks
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.
May 2, 2024

I don't think that there is a way to do this out of the box. You can do "issue in childIssuesOf()", but that only takes a single issue key as a parameter, not a saved filter (or any other JQL).

Scriptrunner does have the "issuefunction in" functionality that has a number of functions, including issuesInEpics(), which allows you to put in a sub-query that will return any issues whose parent Epics meet a particular criteria, or portfolioChildrenOf(), which allows the same thng, but at the layer(s) above epics.

vincenzo_spatafora May 2, 2024

Thanks @Matt Parks , interesting.

Can you pass a saved filter (or any another JQL) to portfolioChildrenOf()?

Is portfolioChildrenOf() outputting all the children tickets of a given issue type ticket?

Kind Regards,

Vincenzo.

Matt Parks
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.
May 2, 2024

portfolioChildrenOf() takes a JQL query, so whatever you want. However, that JQL query will need to return issues above the Epic level in your hierarchy. Then the issuefunction returns any children down to the Epic level (it doesn't return Stories, etc)

 

issuefunction in portfolioChildrenOf("issuetype = Theme")

Assuming that the Theme issuetype is a parent of the Initiative issuetype, which is a parent of the Epic issuetype, the above query will return all Initiatives that have a Theme and all of the Epics under those Initiatives. It will not return the Stories under those Epics, so you would have to get creative to bring in those Stories

issuefunction in portfolioChildrenOf("issuetype = Theme") OR issuefunction in issuesInEpics("issuefunction in portfolioChildrenOf('issuetype = Theme')")

 

But, instead of "issuetype = Theme", you could pass in whatever JQL you wanted, including a saved filter. As long as the issues returned by that saved filter are above the Epic level in your hierarchy, it will work.

vincenzo_spatafora May 2, 2024

Thanks @Matt Parks, appreciated.

In my hierarchy, the Epics is actually the highest level.

So, I'm afraid I got to find another way to get the list of the children associated to the issues given by my saved filter.

Kind Regards,

Vincenzo.

Matt Parks
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.
May 2, 2024

Oh, if Epic is the highest level, then you can just use issuefunction in issuesInEpics().

Inside the issuesInEpics() function, put in JQL that determines which Epics you are referring to, and the function will return children of those Epics.

This will not return sub-tasks of those children, so you'd also need to use the issuefunction in subtasksOf() function to get the subtasks of the children.

vincenzo_spatafora May 2, 2024

Thanks @Matt Parks

I will try that but what about the case (mine), the saved filter is also outputting a Task issue type?

The Jira Cloud issueFunction in ChildrenOf("") would have given in one shot all the children of my saved filter.

Thanks again.

Matt Parks
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.
May 2, 2024

Can you post the contents of your saved filter and then explain exactly what you are looking to get from the issuefunction? I'm not sure that I fully understand.

vincenzo_spatafora May 2, 2024

Hi @Matt Parks,

find please attached my example saved filter which gives out 2 issues: 1 is a Task and 1 is an Epic.

Now, I would like to get from them both, their children and I have thought to use issueFunction in ChildrenOf("") but then I have found that it's only available for Jira Cloud (and I use Jira DC).

Thanks, Vincenzo.Saved_Filter.PNG

 

Matt Parks
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.
May 2, 2024

I don't know if I made it clear earlier, but the issuefunctions are only available in DC if you have Scriptrunner installed. I think they are included in Cloud by default as part of the Enhanced Search.

So, if you don't have Scriptrunner installed in DC, you won't see these issuefunctions (unless changes were made in later versions of DC)

This query will return children of the Epic. If there are any non-epics in that filter, they will be ignored.

issuefunction in issuesInEpics("filter in {name of saved filter}")

This query will return any subtasks that are under any issues returned by the saved filter.

issuefunction in subtasksOf("filter in {name of saved filter}")

If you combine the two into one query, using the OR keyword, you will get everything that you're looking for.

vincenzo_spatafora May 2, 2024

Thank You @Matt Parks.

All clear now.

I have really appreciated your help and above all, your time.

My Kind Regards,

Vincenzo. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2024

Matt is correct - issueFunction (and a lot of other functions) are only available if you have Scriptrunner or Enhanced Search installed (ES is part of the SR app, so if you have SR, you don't need EH)

Suggest an answer

Log in or Sign up to answer