Help me write a query to search for issues with a Parent Link and specific assignee

Jordin April 23, 2024

I am attempting to create a query that would show a custom issue type that is expected to have a parent link to an epic. Furthermore, I'd like to only see custom issues with a parent link to an epic and a specific user.

Is this possible? I figured I'd save the hours of testing this and just ask the community!

3 answers

0 votes
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2024

Hi @Jordin,

Laziness is sometimes seen as an attribute of smart people, right 😅 ...

Your question is a bit vague, but something like this should come close:

parent = ABC-2 AND issuetype = Task and assignee = currentUser()

 ABC-2 is the key of your epic issue. You should obviously replace Task with your specific issue type and currentUser() with the actual user you are trying to locate. Same with assignee of you are looking for another user custom field.

Hope this helps!

Jordin May 9, 2024

Something like that 😂

It feels what I am trying to do is a bit backwards but it would be really insightful to the work I am doing to be able to get a list of epics that are linked to a sub-level custom issue type. 

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2024

That is going to be difficult to impossible without marketplace apps I'm afraid. Finding issues of a specific type assigned to a user would be possible like this:

issuetype = Task and assignee = currentUser() and parent is not empty

would return all issues where the assignee is the logged in user, while the parent is filled out. Jira's hierarchy enforces that the parent of a task is an Epic, so you know that all returned issues have an epic as a parent.

If you want to find a list of epics based on what is essentially a sub-query, Jira has its limitations. There are a couple of marketplace apps that may help you overcome this constraint.

With Scriptrunner enhanced search, you can use the function epicsOf(), while JQL Search Extensions offers an equivalent function called EpicsOfChildrenInQuery()

0 votes
Laurie Sciutti
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 23, 2024

Hi @Jordin ~ need some clarification before offering a solution:

  1. are you asking to query issues that are children of issues linked to Epics or issues that are directly linked to Epics?
  2. regarding the user component of the search, is the specific assignee that you're searching the assignee of the issue or the linked issue?
Jordin May 9, 2024

Yes, #1. I'd like to query and get a list of epics that are directly linked to a sub-level custom issue type.

0 votes
Ragavendran S April 23, 2024

Hi @Jordin 

Before making the query, could you confirm whether it's possible to filter using the parent link? In my project, we don't have access to filter based on parent links, and it shows an error when attempting to do so.

To confirm, please follow the steps below:

Open search > Basic search > More > Type "parent link"

- If you see an error, you cannot write a query.
- If you can use that field for filtering, you can write a query. Choose the value from the dropdown, switch to Advanced, and copy the JQL.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events