Forums

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

How to Filter Linked Issues with Matching Fields

Peter Crowley
Contributor
January 20, 2022

Hello,

I would like to write a JQL query that finds sets of linked issues with matching fields. For example, I want to identify all tasks with subtasks that have matching versions.

If I have the following tasks:

  • Task-1 with affectedVersion=X
    • Subtask-11 with affectedVersion=Y
    • Subtask-12 with affectedVersion=Z
  • Task-2 with affectedVersion=Y
    • Subtask-21 with affectedVersion=Y
  • Task-3 with affectedVersion=Z
    • Subtask-31 with affectedVersion=X
    • Subtask-32 with affectedVersion=Z

I want the filter to find:

  • Task-2 because both Task-2 and Subtask-21 have affectedVersion=Y
  • Task-3 because both Task-3 and Subtask-32 have affectedVersion=Z

 

Is this type of query possible? 
I have access to ScriptRunner Enhanced Search if that helps.

 

Thank you!
Peter

1 answer

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
January 26, 2022

Hi Jan,

I can confirm that in ScriptRunner for Jira Cloud that the parentsOf and subTasksOf functions can be used to search for the information you require and could be used to create a query which would meet your needs.

Regards,

Kristian

Peter Crowley
Contributor
January 26, 2022

@Kristian Walker _Adaptavist_ can you provide a specific query using parentsOf and subTasksOf that would satisfy the example from my original post?

Thank you,
Peter

Kristian Walker _Adaptavist_
Community Champion
January 26, 2022

Hi Peter,

I do not have an exact query to hand but I would advise raising a support request with our support team located here who will be able to assist you to create the query that you require.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer