Forums

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

How can I search the task which has multi 'sub-task' via JQL or SQL?

Guys, I have a question related to JQL(or SQL)

 

Is there any way to search the tasks which has below condition?

1. The task which has 'sub-tasks' more than 2

2. The task which has the link 'is related to' more than 2

 

is it possible to search via JQL or SQL?

2 answers

1 accepted

0 votes
Answer accepted
Piotr Bojko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2018

with this plugin https://marketplace.atlassian.com/apps/1218767/smart-ql?hosting=server&tab=overview

 

you can do following query

select aux.ASISSUEKEY(IL.SOURCE), count(il.DESTINATION) 
from ISSUELINKS IL where name = 'Relates' or name = 'jira_subtask_link'
group by IL.SOURCE HAVING COUNT(IL.DESTINATION) > 2
0 votes
Tuncay Senturk
Community Champion
May 21, 2018

1. Script Runner has "issueFunction in hasSubtasks()" JQL function but I do not know a way to restrict issues which have 2 or more subtasks

2. Enhancer Plugin has "Linked Issues" custom field. You can use it in JQL function e.g. ("Relates Link Field" > 2)

https://confluence.snapbytes.com/display/JEP/Linked+Issues+custom+field

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events