I created a custom field named % complete to our User Stories. I'm attempting to update % complete to the number of sub-tasks with a status of "done" (statusCategory.key = "done") divided by the total number of sub-tasks each time a sub-task is updated.
I can calculate the number of sub-tasks but when it comes to determining the number of "done" sub-tasks I always get a value of zero.
In an effort to resolve this issue, I've simplified my rule to use the use cases from our most current sprint. I then created a variable for the total number of sub-tasks
totalSubtasks {{issue.subtasks.size}}
Next, I tried to determine the number of "done" subtasks several ways. I have a variable for each:
doneSubtasks {{issue.subtasks.where(statusCategory.key = "done").size}}
TOTALDONE {{issue.subtasks.where(status.name = "DONE").size}}
Each time these come back equaling zero,
My original attempt was a little more complicated. A screenshot of the rule is below. Again, each time the number of sub-tasks with a status of "done" is zero.

Any help is greatly appreciated.