How to color a card based on if it has subtasks of a certain status.

I've been struggling with what I think should be a simple task.  Color a card based upon if it has subtasks of a certain status.

I have tried a whole host of various Googling/Stack Overflow/Atlassian Answers and have yet to figure this out.  Any help would be much appreciated.   

These are some of the attempts that have failed:

  • issuetype = "Story" and issueFunction not in hasSubtasks()
  • issue in issuesWithRemoteLinksByGlobalId("SubTaskId")
  • issueFunction in subtasksOf("status = COMPLETED")
  • parent = issuekey

This is likely a simple issue but I'm new to JIRA administration and help would be much appreciated.

2 answers

1 vote

There's no such a built-in function that returns all issues that have at least one subtask. So, issues that have any subtasks under certain statuses doesn't exist either.


You may achieve it with a third party plugin, though . 

Look for Script Runner for JIRA Cloud in the Atlassian Marketplace.

Is there functionality to determine if an issue has subtasks at all? 



I believe is not possible with raw Jira, but I use an addon (JQL tricks plugin) that has a special function you can apply to issue field (issue in subtaskIssuesFromFilter(savedFilterId)) 

Good luck!


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

169 views 4 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you