0

I have user stories in Jira with some labels A,B,C for example. But at subtasks level there is no labeling. Now I need to fetch count of all user stories of that label, their tasks and subtasks.

How can I get subtasks which have no labels but linked to labelled user stories?

Zoe
  • 27,060
  • 21
  • 118
  • 148
shweta_kaushish
  • 141
  • 1
  • 3
  • 17

2 Answers2

0

You can use the following JQL if you have scriptrunner;

( issue IN subtasksOf('type=Story and labels in (label1, label2)') or issueFunction in linkedIssuesOf('type=Story and labels in (label1, label2)')  ) and labels is EMPTY

It both finds the subtasks, and linked issues of the story labeled as label1 and label2. It also filters the issues with own labels.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Kemal Kaplan
  • 932
  • 8
  • 21
0
issuetype in (Task-Agile, Sub-task) AND issueFunction in subtasksOf("Issuetype = story")
Zoe
  • 27,060
  • 21
  • 118
  • 148
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 15 '22 at 12:29
  • 1
    While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Yunnosch Aug 30 '22 at 16:54