Forums

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

JQL Help of Tree View of Personal Assigned Issues

Calvin
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.
December 27, 2023

HI all, I want to see a tree view of issues that I'm assigned too (Bugs/Stories/Tasks and Subtasks). This means I also want to see the item above if I'm assigned as a subtask.

Original thought is to use Structure and pull all items assigned to myself thats a bug/story/task (that part is easy for the JQL).

But the hard part is pulling the story/bug/task AND subtask that has a subtask with an assignee, but NOT the subtask on its own as it will appear as part of this extra search. I do have ScriptRunner if it helps?

Thanks for any JQL help :D

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
December 27, 2023

Hello @Calvin 

Let me see if I understand your situation correctly by using sample data to illustrate.

Task 1 - Assigned to Calvin
|-- Subtask 1.1 - Assigned to Calvin
|-- Subtask 1.2 - not assigned to Calvin

Task 2 - not assigned to Calvin
|-- Subtask 2.1 - Assigned to Calvin

Task 3 - assigned to Calvin
(no sub-tasks)

Task 4 - assigned to Calvin
|-- Subtask 4.1 - not assigned to Calvin

With the above sample data you would want to see in your results:

 

Task 1 - Assigned to Calvin
|-- Subtask 1.1 - Assigned to Calvin

Task 2 - not assigned to Calvin
|-- Subtask 2.1 - Assigned to Calvin

Task 3 - assigned to Calvin
(no sub-tasks)

Task 4 - assigned to Calvin

Is that correct?

Assuming it is, and you have ScriptRunner, then you would need to construct a filter that

1. Selects all Standard Level Issues (i.e. Tasks) that are assigned to you, plus

2. Selects all Subtask Level Issue that are assigned to you, plus

3. Selects all the Standard Level Issues that are parents of the Subtasks assigned to you.

 

#1 Select all Standard Level Issue assigned to you:

issuetype in standardIssueTypes() and assignee=currentUser()

#2 Select all Subtask Level issue assigned to you:

issuetype in subTaskIssueTypes() and assignee=currentUser()

#3 Select all Standard Level Issues that are parents of subtasks assigned to you (requires ScriptRunner).

issueFunction in parentsOf("issuetype in subTaskIssueTypes() and assignee=currentUser()")

 

Combine all of those together with OR operators and appropriate parentheses:

(issuetype in standardIssueTypes() and assignee=currentUser()) or (issuetype in subTaskIssueTypes() and assignee=currentUser()) or issueFunction in parentsOf("issuetype in subTaskIssueTypes() and assignee=currentUser()")

You might also want to add criteria for limiting that to specific project(s). As it is written it would search all projects for matching issues.

 

Note that is just the JQL for selecting the issues. Jira doesn't natively provide a method to display results in a "tree view".

Calvin
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.
January 31, 2024

Thanks Trudy, is great!

 

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
December 27, 2023

Hi @Calvin

first off, I'm not a Structure expert myself so I can't really comment on this particular direction; I'm sure someone else can lean in here. I've also been thinking about a native/out-of-the-box solution but couldn't come up with anything great.

However, if you're open to solutions from the Atlassian Marketplace, I believe that your use case would be trivial to solve using the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchies. 

If you use an issue hierarchy in combination with JXL's column filtering feature, there's an option to keep ancestors (i.e., parent issues) in the result set. With this, you can build the view that you are looking for in just a couple of clicks, like so:

personal-issues-tree.gif

(Note that e.g. WORK-121 and WORK-134 aren't assigned to me themselves, but are still shown - though greyed out - as they have sub-tasks that are assigned to me.)

This would also work with epics, or any other levels of hierarchy you may want to model.

Any questions just let me know,

Best,
Hannes

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events