How to track sub-task which is assigned to user "X", but the major type is not assigned to him

Tenyu Stoynov April 29, 2024

How can i track sub-tasks or tasks which are assigned to user "X", but the parent of this task/sub-task is not assigned to user "X"?

e.g. sub-task '456' is assigned to 'John'. The Sub-task '456' is child for task '123' which is assigned to 'Peter'.

How to catch this sub-task?

2 answers

0 votes
Charlotte Santos -Appfire-
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.
April 30, 2024

Hi @Tenyu Stoynov 

I’m Charlotte, a support engineer at Appfire and I’m here to help you.

Unfortunately, natively, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to get all sub-tasks assigned to a specific user but the task is assigned to another one:

issue in subtasksOfParentsInQuery("assignee=Peter") AND assignee=John

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

0 votes
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 30, 2024

Hi @Tenyu Stoynov

Unfortunately, this is trickier than one might think; as a hierarchical query, it would really require some kind of "join" or "subquery", which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant parents, and then use the keys of these parents in a second query, in a "parent in (KEY-1, KEY-2, ...)" clause.

If you want to run your search dynamically, without manually "stitching" two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to "propagate" parent information down to the children, and then use the respective field(s) on the children to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. Scriptrunner and JQL Search Extensions are popular, but there are others, too.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 30, 2024

Just to expand on the last point, this is how this would look in the app that my team and I are working on, JXL for Jira. Put simply, you'd create a sheet with all issues that are potentially relevant to you, enable the default issue hierarchy (that's just one click), and then use JXL filtering capabilities to narrow down to the issues that you care about:

task-sub-task-assignee-filtering.gif

(This would be all sub-tasks assigned to me - highlighted using conditional formatting - with a parent not assigned to me.)

Once you have your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Any questions just let me know!

Suggest an answer

Log in or Sign up to answer