I have a JIRA project and some of my tasks contains subtasks with lasbels \"needDesign\".
Is it possible to find all parent tasks which contains subtasks with that l
Jira JQL doesn't not provide this out of the box, however there are many add-ons that extend JQL to allow this.
I would normally suggest you install the Script Runner add-on (see https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner) as it contains many useful built-in functions to perform searches in JQL like the one you are asking about.
The particular function for this add-o you want to use is:
parentsOf(Subquery) - Returns the parents of issues specified by the subquery.
issueFunction in parentsOf("labels in (needDesign)")
Unfortunately you stated you are using ondemand and this add-on is not available for ondemand currently.
Your options as far as I see is to:
This type of subquery is so fundamental for anyone using subtasks I am surprised that there isn't a bundled solution for this, perhaps it is a potential performance issue for the ondemand offering.
I know that is not what you want to hear but hope that answers your question.