简体   繁体   English

Jira JQL - 显示所有子任务

[英]Jira JQL - Show all child tasks

I am trying to display all my tasks under 3 levels of Macro-Feature and/or Epic Link, as my organization look like this :我试图在 3 个级别的宏功能和/或史诗链接下显示我的所有任务,因为我的组织如下所示:

  • Macro Feature宏功能
  • Epic Link (= feature) => Epic Link (= subfeature) => Tasks史诗链接(= 功能)=> 史诗链接(= 子功能)=> 任务
  • or directly Epic Link => Tasks或直接 Epic Link => 任务

I want to see both levels, how can I achieve this please ?我想看到两个级别,请问我怎样才能做到这一点?

In pure Jira Server, it is not possible to follow the links, you will have to query issues assigned to the epic, take their issue keys or ids and build a combined query.在纯 Jira Server 中,无法跟踪链接,您必须查询分配给史诗的问题,获取它们的问题键或 ID 并构建组合查询。 Let's say you have top-level epics called TOP-1 and TOP-2, you will have to run a query:假设您有名为 TOP-1 和 TOP-2 的顶级史诗,您必须运行一个查询:

issue in linkedIssues("TOP-1", "is task of") and issuetype = Epic

take the returned issue keys, repeat for TOP-2, this will give you the second level epics, let's say SUB-1 and SUB-2, then you need to run a query like:获取返回的问题键,重复 TOP-2,这将为您提供第二级史诗,假设 SUB-1 和 SUB-2,那么您需要运行如下查询:

"Epic Link" in (TOP-1, TOP-2) or "Epic Link" in (SUB-1, SUB-2)

this will give you issues assigned to those epics, without subtasks.这将为您提供分配给这些史诗的问题,而没有子任务。 Quite cumbersome and requires manual updating, definitely not worth doing.相当麻烦,需要手动更新,绝对不值得做。

The alternative would be getting a plugin that extends JQL functionality, like JQL Search Extensions .另一种方法是获得一个扩展 JQL 功能的插件,比如JQL Search Extensions Then you could nest the JQL queries like:然后你可以嵌套 JQL 查询,如:

issue in allIssuesInEpic("TOP-1", "TOP2") or (issue in allIssuesInEpic(issue in linkedBy("TOP-1", "TOP-2", "is task of")))

Where first part of the query issue in allIssuesInEpic("TOP-1", "TOP2") returns the issues directly assigned to the TOP-1 or TOP-2 epics, and the second part issue in allIssuesInEpic(issue in linkedBy("TOP-1", "TOP-2", "is task of")) finds the epics linked as "is task of" with top-level epics and then finds all the issues with subtasks assigned to those second level epics.其中issue in allIssuesInEpic("TOP-1", "TOP2")查询issue in allIssuesInEpic("TOP-1", "TOP2")第一部分返回直接分配给 TOP-1 或 TOP-2 史诗的issue in allIssuesInEpic(issue in linkedBy("TOP-1", "TOP-2", "is task of"))的第二部分issue in allIssuesInEpic(issue in linkedBy("TOP-1", "TOP-2", "is task of"))找到与顶级史诗链接为“is task of”的史诗,然后找到分配给这些二级史诗的子任务的所有问题。 You will need to extend the query for every level of nesting, with the structure you have described, above query will do what you need.您需要使用您描述的结构扩展每个嵌套级别的查询,上面的查询将满足您的需求。 However, if you will add the third level of nesting then you will have to extend the query like:但是,如果您要添加第三级嵌套,则必须像这样扩展查询:

issue in allIssuesInEpic("TOP-1", "TOP2") or (issue in allIssuesInEpic(issue in linkedBy("key in (TOP-1, TOP2) or issue in linkedBy("TOP-1", "TOP-2", "is task of")", "is task of")))

You can make it more readable by creating filters for each level of nesting, for example, create a filter called Features:您可以通过为每个嵌套级别创建过滤器来使其更具可读性,例如,创建一个名为 Features 的过滤器:

key in (TOP-1, TOP-2)

then create a filter called sub-features:然后创建一个名为 sub-features 的过滤器:

issue in linkedBy("filter = Features", "is task of")

then create a final query like:然后创建一个最终查询,如:

issue in allIssuesInEpic("filter = \"Features\" or filter = \"sub-features\"")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM