Find tickets with assignee matching (or not matching) subquery

Stacy Zalesak January 8, 2021

Hi Everyone,

I need a way to find a list of issues where an assignee value is in a sub query. For example, i have a list of issues underneath an epic Y. I want to find a list of all issues under a different project ABC that have the same assignees as in list Y.

Psudocode:  Show me all all issues in Project ABC where assignee in (select assignee from child issues of Epic Y)

 

Does anyone have any ideas on how to write that in JQL? or using scriptrunner functions?

2 answers

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2021

Hi Stacy,

Thank you for your question.

I can confirm that ScriptRunner for Jira Cloud provides the issueInEpics() and epicsOf() enhanced search functions that you would be able to use to search for issues in an epic and these may be useful to achieve your requirement if you are using Jira Cloud.

Regards,

Kristian

Stacy Zalesak January 9, 2021

Thanks. i use those functions all the time but they dont help me find where an attribute (assignee) in my query matches the attribute of the tickets in the epic.

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2021

Hi Stacy,

Thank you for your response, I can confirm they can be used to search for where values match a certain query but the JQL does not support matching where a value such as an assignee matches the value of a field in another issue and you can only hardcode the values you require in your queries in Jira Cloud.

Regards,

Kristian

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2021

Hi @Stacy Zalesak ,

welcome to the Atlassian Community!

Do you have Cloud or Server or Data Center Jira?

Probably this could be done, if you create your Custom JQL Function using ScriptRunner, but I believe this option not available for cloud.

Suggest an answer

Log in or Sign up to answer