}
private Map<Long, Integer> departmentDepth = new LinkedHashMap<Long, Integer>();
private BODepartment[] getDepartments() {
IDepartmentManager departmentManager = DepartmentManagerFactory.getDepartmentManager();
List<BODepartment> deps = new ArrayList<BODepartment>(departmentManager.getAllDepartments(ApplicationContext.getCurrentUser()));
Set<BODepartment> depsReturn = new LinkedHashSet<BODepartment>();
for (BODepartment department : deps) {
// ignore the childTasks
if (department.getParentDepartmentID() == 0L) {
depsReturn.add(department);