private Collection getAllRelevantIssueTypeObjects() {
    if (allRelevantIssueTypeObjects == null) {
      if (subTaskManager.isSubTasksEnabled()) {
        allRelevantIssueTypeObjects = constantsManager.getAllIssueTypeObjects();
      } else {
        allRelevantIssueTypeObjects = constantsManager.getRegularIssueTypeObjects();
      }
    }

    return allRelevantIssueTypeObjects;
  }
 public Collection getAllIssueTypes() throws Exception {
   if (subTaskManager.isSubTasksEnabled()) {
     return constantsManager.getAllIssueTypeObjects();
   } else {
     final ArrayList returnValues = new ArrayList(constantsManager.getRegularIssueTypeObjects());
     // Now, since subtasks are disabled we want to make sure we add any subtask issue types that
     // are already
     // selected in the custom field and make sure that the sort order is the same as when we call
     // getAllIssueTypeObjects
     final List intersection =
         new ArrayList(
             CollectionUtils.intersection(
                 constantsManager.getSubTaskIssueTypes(),
                 getCustomField().getAssociatedIssueTypes()));
     Collections.sort(intersection);
     for (final Object anIntersection : intersection) {
       final GenericValue genericValue = (GenericValue) anIntersection;
       returnValues.add(0, constantsManager.getIssueTypeObject(genericValue.getString("id")));
     }
     return returnValues;
   }
 }