Ejemplo n.º 1
0
 public String cleanDescription() {
   int index = 0;
   String returnVal = (String) anIssue.valueForKey("shortDesc");
   boolean hasPrefix = returnVal.startsWith("TASER EVAL: ");
   // System.out.println("index - " + index);
   if (hasPrefix == true) {
     index = 12;
   }
   return returnVal.substring(index);
 }
Ejemplo n.º 2
0
 public NSArray sortedClosedChildren() {
   Object orderings[] = {
     EOSortOrdering.sortOrderingWithKey("version", EOSortOrdering.CompareAscending),
     EOSortOrdering.sortOrderingWithKey("targetMilestone", EOSortOrdering.CompareAscending),
     EOSortOrdering.sortOrderingWithKey(
         "priority", EOSortOrdering.CompareCaseInsensitiveAscending),
     EOSortOrdering.sortOrderingWithKey(
         "bugSeverity", EOSortOrdering.CompareCaseInsensitiveAscending),
   };
   return EOSortOrdering.sortedArrayUsingKeyOrderArray(
       (NSArray) anIssue.valueForKey("closedChildren"), new NSArray(orderings));
 }
Ejemplo n.º 3
0
  public String filteredRelease() {
    String returnVal;

    String actualRelease = (String) anItem.valueForKey("version");
    if (actualRelease.equals("_Backlog")) {
      returnVal = "Uncommitted";
    } else if (actualRelease.equals("Proposed for the next release")) {
      returnVal = "Proposed";
    } else {
      returnVal = actualRelease;
    }

    return returnVal;
  }
Ejemplo n.º 4
0
  public NSArray customerIssues() {
    NSMutableArray allChildren = new NSMutableArray();
    NSMutableArray qual = new NSMutableArray();
    Item customer;
    Item child;

    if (customerIssues == null) {

      if (bugId() != null) {
        qual.addObject(EOQualifier.qualifierWithQualifierFormat("bugId=" + bugId(), null));
        EOFetchSpecification spec =
            new EOFetchSpecification("Item", new EOAndQualifier(qual), null);

        // Perform actual fetch
        customerIssues =
            (NSArray) session().defaultEditingContext().objectsWithFetchSpecification(spec);

      } else {

        Enumeration enumer = ((NSArray) customerIssueDisplayGroup.allObjects()).objectEnumerator();
        // For each Customer
        while (enumer.hasMoreElements()) {
          customer = (Item) enumer.nextElement();
          NSArray children = (NSArray) customer.valueForKey("allChildren");

          // Add all of their issues (if they haven't been added already
          Enumeration enumer2 = children.objectEnumerator();
          while (enumer2.hasMoreElements()) {
            child = (Item) enumer2.nextElement();
            if (!allChildren.contains(child)) {
              allChildren.addObject(child);
            }
          }
        }
        Object orderings[] = {
          EOSortOrdering.sortOrderingWithKey("version", EOSortOrdering.CompareAscending),
          EOSortOrdering.sortOrderingWithKey("targetMilestone", EOSortOrdering.CompareAscending),
          EOSortOrdering.sortOrderingWithKey(
              "priority", EOSortOrdering.CompareCaseInsensitiveAscending),
          EOSortOrdering.sortOrderingWithKey(
              "bugSeverity", EOSortOrdering.CompareCaseInsensitiveAscending),
        };

        // Sort the issues
        customerIssues =
            EOSortOrdering.sortedArrayUsingKeyOrderArray(allChildren, new NSArray(orderings));
      }
    }
    return customerIssues;
  }
Ejemplo n.º 5
0
 public boolean isP1() {
   return (((String) anIssue.valueForKey("priority")).equals("1 - Urgent")) ? true : false;
 }
Ejemplo n.º 6
0
 public String bugURL() {
   return ((Application) Application.application()).bugzillaHostUrl()
       + "/show_bug.cgi?id="
       + anItem.valueForKey("bugId");
 }
Ejemplo n.º 7
0
 public String timeSinceModified() {
   return elapsedTimeSimple((NSTimestamp) anItem.valueForKey("lastdiffed"), today);
 }
Ejemplo n.º 8
0
 public String timeSinceOpened() {
   return elapsedTimeSimple((NSTimestamp) anItem.valueForKey("creationTs"), today);
 }