Hello folks,
I am struggling with what it must be a simple jql. I need to be able to retrieve the list of Stories that belong to an Epic as well as the Subtasks for this stories.
Can't find any solution that works!
Hi @Allende Hernández Llácer
It depends on your hosting type:
Cloud:
parentEpic = ABC-1
^ This will provide all stories / sub-tasks below one Epic
Server:
issue in childIssuesOf("ABC-1")
^ I believe this is native to Jira, but it might required Advanced Roadmaps - give it a try and let us know!
You can include OR statements to include more than one phrase and search by multiple Epics.
If Server option doesn't work for you - or you want a more complex query (such as give me all the stories / sub-tasks below all Epics in one project) - you'll need an app which can provide more advanced JQL functions. Let us know in the comments, along with your host type!
Ste
Thank you Steve. I believe I have a Server installation. The url is private plus I don't have parentEpic available.
Unfortunately I also don't have childIssuesOf() available, so I assume is not native. My control over the Jira instance is very limited as it is heavily managed at the corporate level, does that app runs on the server?
childIssuesOf is likely related to Advanced Roadmaps if not native (formerly Jira Portfolio).
Aside from that, you would need an app which enhances JQL functions - for example ScriptRunner.
This allows for JQL searches like:
issueFunction in issuesInEpics("key = ABC-1") OR issueFunction in subtasksOf(issueFunction in issuesInEpics('key = ABC-1')")
^ Searching for all standard and sub-task issues below one Epic. This type of JQL function also allows for sub-queries, so key = ABC-1 could be replaced with Project = ABC to find stories / sub-tasks below all Epics in one project.
I would contact your Jira Admin team and ask if they have this app - or a similar advanced JQL app - available which you could utilise.
The app above is just an example - there are a few others - you might already have one installed
Thank you!. I will definitely check with them!
Hi,
Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack (if you are on Server / DataCenter) you can type the following:
1) A bunch of Epics
project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto"
2) Find all tasks (Tasks, Stories,...) under a given Epics
issue IN issuesInEpics(' project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto" ')
3) Find all subtasks under a given Epics
issue IN subtasksOf(' project = PL AND issuetype = Epic AND fixVersion = "RNO - WA - Predictive Auto" ')
4) Find all subtasks under issues linked to the given Epics
issue IN subtasksOf(' issue IN issuesInEpics(" project = PL AND issuetype = Epic AND fixVersion = \"RNO - WA - Predictive Auto\" ") ')
(*) Note that this is just an example, you must tune above query to fit your needs.
Using this app you can also query other issues relations, check:
Regards
Actually you can do a simple select using standard Jira filters, try selecting userstories and tasks by filering using 'Epic Link' field
Is this query correct to identify all the epics under the project & stories, tasks, sub-tasks under Epics?SELECTji.ID as issueid,CONCAT(pr.pkey, '-', ji.issuenum) as issuekey,jip.ID as parentid,CONCAT(prp.pkey, '-', jip.issuenum) as parentkey,itp.pname as parentissuetype,it.pname as issuetype,js.pname as issuestatus,ji.TIMEORIGINALESTIMATE,ji.TIMESPENTFROM vw_jiraissue jiJOIN vw_project pr ON ji.PROJECT = pr.IDJOIN vw_issuestatus js ON ji.issuestatus = js.IDJOIN vw_issuetype it ON ji.issuetype = it.IDLEFT JOIN vw_issuelink il ON ji.ID = il.DESTINATIONLEFT JOIN vw_issuelinktype ilt ON il.LINKTYPE = ilt.IDLEFT JOIN vw_jiraissue jip ON il.SOURCE = jip.IDLEFT JOIN vw_issuetype itp ON jip.issuetype = itp.IDLEFT JOIN vw_project prp ON jip.PROJECT = prp.IDWHERE it.pname in ('Task', 'Story','Bug','Action Point','Risk') AND ilt.LINKNAME = 'Epic-Story Link' AND pr.PKEY = 'ABC';
It looks like you're new here. Sign in or register to get started.