JQL Filter to return one subtask based on status of another subtask

Alex Cumberland
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 25, 2023

Sciptrunner version:  7.11

JIRA Server: 9.6.0

One of my users is trying to set up a filter to be used on a dashboard where they need to show the subtasks in one status but only if the second subtask is closed or resolved.  Both subtasks would be under the same parent.

  • Parent
    • SubTask1 - open
    • SubTask2 - closed

So in this instance the filter would return  SubTask1 as it is open and due to SubTask2 being closed

  • Parent
    • SubTask1 - open
    • SubTask2 - open

In this instance it would not return SubTask1 since SubTask2 is still open.

 

I have tried variations of subtasksOF and parentsOF... but can not figure out how to use SubTask2 as the condition to display SubTask1.

 

Any help would be appreciated and thanks in advance....

 

 

 

1 answer

0 votes
Ojase Emmanuval
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 8, 2023

@Alex Cumberland 

I have used scriptrunner for server in the past and haven't used it recently. Can you check if the following query work?

issueFunction in parentsOf("project = ABC and issuetype=Sub-task and status = open") and issueFunction in parentsOf("project = ABC and issuetype=Sub-task and status = Closed")

Thanks,

Ojase

Suggest an answer

Log in or Sign up to answer