Forums

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

Query to return parent issues of specific epics

Szymon F May 25, 2023

Hi, I am using Jira Cloud + Plans + Scriptrunner and struggling with a query that returns parents of epics. Here is my example:

Initiative-123

  • Epic-234
  • Epic-345 (Planned = YES)

Initiative-987

  • Epic-456
  • Epic-567 (Planned = YES)

 

I was trying hard to write a query based on the custom field 'Planned' on the epic returns all initiatives.

Here are my tries that do not return anything:

issuetype = Initiative AND issueFunction in linkedIssuesOf("Planned = 'YES'", "is Epic of") 
issueFunction in parentsOf(...)

If you have any ideas, please let me know

2 answers

1 accepted

1 vote
Answer accepted
Szymon F May 29, 2023

I got the answer from Adaptavist - it is not possible to achieve it on the Jira Cloud due to API limitations, but it works in Jira Server. However, there is a feature request that you can all vote to make it happen:

https://scriptrunner-for-jira-cloud.nolt.io/47 

Ditte Simard
Community Champion
May 30, 2023

I will definitely vote for that request!  Thank you for posting what you found out.

0 votes
Ditte Simard
Community Champion
May 25, 2023

You should be on the right track with the "parentsOf" function.  Since the Initiatives are parents of the Epics, try something like this:

issueFunction in parentsOf("issuetype = Epic AND 'planned' = "YES")

Szymon F May 25, 2023

That is the thing, it does not work. I even tried to use

issueFunction in parentsOf("key = Epic-345")

with 0 results. 

Given that I believe it should work and you confirmed my thinking there is one more issue that can cause this problem:

https://community.atlassian.com/t5/Jira-Software-questions/JQL-for-certain-Epic-parents/qaq-p/2253117

Adaptavist support suggests that a likely cause is a conflict in function names between multiple Jira add-ons

It was posted for Jira Server but I guess a similar issue might be applicable to Jira Cloud. In the meantime I will reach out to the Adaptavist support

Like Ditte Simard likes this
Venugopala Naidu
Contributor
May 26, 2023

@Szymon F If you are in Jira software premium plan please try to search child epics of initiatives rather than try searching parents of epics by using the below query:

issuekey in portfolioChildIssuesOf("Initiative Key") AND type in (Epic)

issuekey in portfolioChildIssuesOf("ABC-123") AND type in (Epic)

Szymon F May 26, 2023

This will not give me the results that I need. The CF is on the epic but I am interested in the Initiative list. 

Anyway, thank you for your suggestion!

Suggest an answer

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

Atlassian Community Events