Пример #1
0
 /**
  * Only invoked when displaying the Project and Issue type as part of the bulk move operation
  *
  * @return Field HTML
  */
 public String getFieldHtml(String fieldId, BulkEditBean bulkEditBean) {
   OrderableField orderableField = (OrderableField) fieldManager.getField(fieldId);
   return orderableField.getBulkEditHtml(
       bulkEditBean,
       this,
       bulkEditBean,
       EasyMap.build(
           OrderableField.NO_HEADER_PARAM_KEY,
           Boolean.TRUE,
           "fieldNamePrefix",
           bulkEditBean.getKey()));
 }
Пример #2
0
  // Determine whether there are available target subtasks
  public boolean isSubTaskTypesAvailable() {
    IssueTypeSystemField issueTypeField =
        (IssueTypeSystemField) fieldManager.getField(IssueFieldConstants.ISSUE_TYPE);
    Collection selectedIssues = getBulkEditBean().getSelectedIssues();
    Collection selectedSubTasks = new ArrayList();

    for (Iterator iterator = selectedIssues.iterator(); iterator.hasNext(); ) {
      Issue issue = (Issue) iterator.next();
      if (issue.isSubTask()) {
        selectedSubTasks.add(issue);
      }
    }
    return !issueTypeField.isHasCommonIssueTypes(selectedSubTasks);
  }
Пример #3
0
 Field validateDateField(String fieldId, Collection<ValidationError> errors) {
   final Field field = fieldManager.getField(fieldId);
   if (field == null) {
     final ValidationError error =
         new ValidationError(DAYS, "gadget.time.since.invalid.date.field", fieldId);
     errors.add(error);
   } else {
     if (!isDateTypeField(field)) {
       final List<String> params = Arrays.asList(fieldId, field.getName());
       final ValidationError error =
           new ValidationError(DAYS, "gadget.time.since.not.date.field", params);
       errors.add(error);
     }
   }
   return field;
 }
Пример #4
0
 public boolean isIssueTypesAvailable() {
   IssueTypeSystemField issueTypeField =
       (IssueTypeSystemField) fieldManager.getField(IssueFieldConstants.ISSUE_TYPE);
   return !issueTypeField.isHasCommonIssueTypes(getBulkEditBean().getSelectedIssues());
 }