pub fn compute_direct_progress(
conn: &Connection,
goal_id: &str,
) -> Result<GoalProgress, HierarchyError>Expand description
Compute the direct progress of a goal: counts its immediate children.
A child state of done or archived increments done.
A child state of doing increments in_progress.
All non-deleted children are counted in total.
ยงErrors
Returns HierarchyError::ItemNotFound if goal_id does not exist,
HierarchyError::NotAGoal if the item is not of kind goal, or
HierarchyError::Db for database failures.