1

I would like to select all tasks assigned to the current user, where no subtasks are assigned to the current user. This will let me make a report that warns a developer if they are currently accountable for a functional user story, but not working on any technical subtasks related to it.

I thought it would be this (using the Scripted JQL functions):

assignee = currentUser()
and (issueFunction in parentsOf("assignee != currentUser()"))

Unfortunately this subquery does not include unassigned subtasks, despite the assignee presumably being null in this case. I tried experimenting with multiple issueFunction clauses, but that seemed like a bit of a rabbit-hole when what I want is not that complicated.

An example of what I want in SQL would look something like this:

select distinct
    t.* from Task t
join
    Subtask st using (t.Id = st.TaskId)
where
    t.AssigneeId = CurrentUserId
    and st.AssigneeId != CurrentUserId
4

1 回答 1

1

此查询执行所需的操作。它排除了已将受理人设置为当前用户的子任务,然后获取所有其他父任务。

issuefunction in parentsOf("assignee != currentUser() or assignee is empty") 
AND assignee = currentUser() 
AND not (issuefunction in parentsof ("assignee = currentUser()"))
于 2014-06-23T15:32:44.347 回答