Does anyone have any code that would identify any Issues say in the To Do category, but with children that have progressed to the In Progress category ?
I can do some bits individually eg;
Step 1 - project in ("project 1, Project 2") AND issuetype = "Business Outcome" AND statusCategory = "To Do"
Step 2 - (where filter 218734 is the above)
issueFunction in portfolioChildrenOf("filter = 218734") AND statusCategory in ("In Progress", Done)
Step 3 - (where filter 218735 is the above)
issueFunction in portfolioParentsOf("filter = 218735") AND issuetype = "Business Outcome"
Which works ok for Portfolio Epic, Epic and Capability, but then I struggle when it gets to Features as the above commands don't work at this level ?
The three-step filter chain you've built is solid — the issue is that issueFunction in portfolioChildrenOf/ParentsOf is a ScriptRunner/Elements Connect function and its behavior can be inconsistent below the Epic level depending on how your hierarchy is configured in Advanced Roadmaps.
A cleaner single-query approach using native JQL:
project in ("Project 1", "Project 2")
AND issuetype = "Business Outcome"
AND statusCategory = "To Do"
AND issueFunction in subtasksOf("statusCategory in ('In Progress', Done)")
If Features sit below Epic in your hierarchy but above Story, they may not respond to portfolioChildrenOf the same way — Advanced Roadmaps treats levels differently than the native Jira hierarchy.
What usually works at the Feature level:
Use parent instead of portfolio functions:
issueFunction in portfolioParentsOf(
"issuetype = Feature AND statusCategory in ('In Progress', Done)"
)
AND statusCategory = "To Do"
If that still fails, the hierarchy level likely isn't recognized by ScriptRunner's portfolio functions. In that case, the most reliable workaround is a two-filter approach saved as a board filter — exactly what you're already doing — but using parent in (filter = X) at the Feature level instead of portfolio functions.
What version of ScriptRunner are you running, and is this team-managed or company-managed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.