TrackStudio Enterprise 3.1
Example 3

To calculate a summary of the actual budget for all not-closed tasks, use the following task processing script:

public double getAbudget(Object t) {
    double d = 0;
    if(t.getActualBudget() != null && t.getClosedate() == null)
        d = t.getActualBudget().doubleValue();
    for(Iterator it = t.getChildren().iterator(); it.hasNext();)
        d += getAbudget(it.next());
    return d;
}
return getAbudget(task);

Associated custom field properties:

Property 
Value 
Type 
Float 
Copyright (c) 2002-2005. All rights reserved.