示例#1
0
 public List<Status> getDoneAndAcceptedStatusOfSprint() {
   Status acceptedStatus = statusService.findStatusAcceptedBySprintId(this.sprint.getSprintId());
   Status doneStatus = statusService.findStatusDoneBySprintId(this.sprint.getSprintId());
   List<Status> status = new ArrayList<Status>();
   status.add(doneStatus);
   status.add(acceptedStatus);
   return status;
 }
示例#2
0
  /** Create a new Issue by information entered in view and save into database */
  public void addIssue() {

    // Remove Control Characters
    newIssue.setSubject(newIssue.getSubject().replaceAll("\\p{Cntrl}", ""));
    newIssue.setDescription(newIssue.getDescription().replaceAll("\\p{Cntrl}", ""));
    newIssue.setNote(newIssue.getNote().replaceAll("\\p{Cntrl}", ""));

    newIssue.setParent(selectedIssue);
    newIssue.setSprint(selectedIssue.getSprint());
    newIssue.setStatus(
        statusService.findStatusStartBySprintId(selectedIssue.getSprint().getSprintId()));
    newIssue.setEstimate("D0T0");
    newIssue.setRemain("D0T0");
    newIssue.setType("Task");
    newIssue.setPointFormat("1");
    newIssue.setPriority("MUST");
    newIssue.setOldId(null);
    newIssue.setCreatedDate(new Date());
    issueService.saveIssue(newIssue);

    // Update status userstory
    UserStory userStory = userStoryService.findUserStoryByIssue(newIssue);
    UserStory.StatusType status = userStoryService.findStatusOfUserStory(userStory);
    userStory.setStatus(status);
    userStoryService.update(userStory);

    resetForm();
    RequestContext.getCurrentInstance().addCallbackParam("save", true);
    loadIssues();
  }