code: public List<Issue> getChildren(Issue redmineParentIssue) {
          List<Issue> rootIssues = new ArrayList<Issue>();
          Iterator<Issue> it = issuesMap.values().iterator();
          Integer parentID = null; // look for root level by default
          boolean lookingForRootTasks = true;
          if (redmineParentIssue != null) {
              parentID = redmineParentIssue.getId();
              lookingForRootTasks = false;
          }
          while (it.hasNext()) {
              Issue issue = it.next();
              if (lookingForRootTasks
                      && (issue.getParentId() == null)
                      || (!lookingForRootTasks && (issue.getParentId() != null) && (issue
                      .getParentId().equals(parentID)))) {
                  rootIssues.add(issue);
              }
          }
          return rootIssues;
      }
docs: TODO add junit test for this new method