Forums

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

JQL for Epics that don't contain a type of task

Christopher Foley
Contributor
January 26, 2022

Hi,

I am looking for a way to pull out Epics which don't contain a Task which is assigned to a specific Team. I am basically trying to extract gaps, where we have an Epic, I know has an impact on our docs team, but when I look inside there is no Task defined which is assigned to the Docs Team.

So I need the capability, in JQL, to iterate through the issues inside one of these Epics and return the Epic, if there is no task in there that satisfies a certain criteria (in my case its 'team = 'Docs'').

I have looked at Adaptavist Scriptrunner functions, but nothing jumps out at me that would allow me perform this query.

Currently I use 2 queries and have to manually cross check both;

  • one pulls out the Epics that have docs impacts (labels in (impacts-docs)
  • project = MY-PROJECT AND issuetype = Epic AND statusCategory != Done AND labels in (impacts-docs)
  • the second looks at the same Epics and spins through the tasks in each Epic and returns a Task if it has its team = docs. This tells me that these Epics are good and have a specified docs task
  • issueFunction in issuesInEpics("project = MY-PROJECT and labels in (impacts-docs) and statusCategory != Done") and Team = 'Docs'

It's the diff(at Epic level) of these queries which gives me what I want.

Any ideas if this can actually be done?

Chris.

1 answer

0 votes
Pramodh M
Community Champion
January 26, 2022

Hi @Christopher Foley

Try this

"Parent Link" = EMPTY and Issuetype = "Epic"

Thanks,
Pramodh

Christopher Foley
Contributor
January 27, 2022

Hi @Pramodh M 

Thanks for suggestion, but this will not work. I am looking for Epics which don't have a child task which has a specific team assignment.

Chris. 

Pramodh M
Community Champion
January 27, 2022

My Suggestion was to use this a base query and include your query as well

"Parent Link" = EMPTY

will return the Epics which don't have any child issues  

Suggest an answer

Log in or Sign up to answer