Help checking children of a Jira Capability

I need to do a simple thing: run through all Capability members with an empty Finish-Date, and for each of these Capabilities, check that all child Story (not Epics) statuses are closed.

I need my resulting list to be Capabilities still needing a manually-entered Finish-Date because all child Stories are closed.

I picture something like this pseudocode, but all variations have given me grief.

CASE WHEN

 current member issue type = "Capability"  AND Capability Finish-Date is Empty

THEN

 Check that ALL child  Stories have status = "closed" 

END

When I place a Count function in a CASE-WHEN, it calls it a logical expression instead of a numeric result and gives me an error.

Thanks for any advice. I know it will be a straightforward solution, but not finding any good examples out there yet.

Wow, no love for this one. Maybe too simple to even address?

Hi @daveaust,
If you want to check if all stories have been resolved in the issue hierarchy at the Capability level if the capability finish date is empty, then you can follow the steps to create a report:

  1. Add the “Issue” dimension in Rows and select the needed hierarchy. I selected the Advanced Roadmap hierarchy as I have it in my dimension.
  2. Create a measure that checks if the issue type is “Capability,” if the “End Finish” date is empty and if the tuple of stories created is equal to stories resolved. At the upper level in the issue hierarchy, the stories created and resolved are aggregated from the levels below and thus can be compared to see if all stories have been resolved. In the formula, please change “Feature” to your issue type “Capability”.
CASE WHEN
  [Issue Type].[Issue Type].getMemberNameByKey(
  [Issue].CurrentHierarchyMember.get('Issue type ID')
  ) = 'Feature'
  AND
  IsEmpty([Measures].[Issue End-finish date])
  AND
  ([Measures].[Issues created],
  [Issue Type].[Story]) = 
  ([Measures].[Issues resolved],
  [Issue Type].[Story])
THEN
  "need to add issue end-finish date"
END

In the report, it would look like this:

best,
Gerda // support@eazyBI.com