Filter to return all epics and child issues

DLPGF June 24, 2024

Hi,

I would like to filter by all open Epics or resolved on/after 01-01-2024 along with their child issues. I also want to exclude any issues with don't have a parent (epic).

I got some of it done but I know it's not correct. I'm using scriptrunner.

project = "myproject" and ((issuetype = Epic and statusCategory = Done and resolved > "2024-01-01") OR (issuetype = Epic and statusCategory != Done) OR issueFunction in issuesInEpics("resolved > "2024-01-01""))

1 answer

0 votes
Tommaso Gionfriddo _Teklada_
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.
June 24, 2024

Hi @DLPGF ,

I don't have access to Scriptrunner right this moment, but I believe this should work.

Simply break it into chunks.

Find epics: type = epic and resolved >= "2024-01-01"

Find all children of those epics: issueFunction in issuesInEpics(" type = epic and resolved >= '2024-01-01' ")

Put it together and we get

project = "myproject" and ( ( type = epic and resolved >= "2024-01-01" ) or ( issueFunction in issuesInEpics(“ type = epic and resolved >= ‘2024-01-01’ ”) ) )

 

DLPGF June 24, 2024

Thanks! I updated the filter to:

project = myproject and (issueFunction in issuesInEpics("type = epic and statusCategory NOT IN (Done)") OR (issueFunction in issuesInEpics("type = epic and statusCategory IN (Done) and resolved >= '2024-01-01'"))) OR ( type = epic and resolved >= "2024-01-01" ) OR ( type = epic and statusCategory NOT IN (Done))

 

This will take all child issues with non-complete epics or completed epics after 01-01-2024. It will also pull all the epics (non complete or completed after 01-01-2024)

Does this look correct?

Suggest an answer

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

Atlassian Community Events