public int getMinDuration()
    {
        minDuration = 0;
        for (Task task : ProjectPlanner.getOpenProject().getWBT().getLeaves(primaryTask))
        {
            minDuration = minDuration + task.getMinDiration();
        }
        return minDuration;
    }