Exemple #1
0
 private void fillIssue(ContextBuilder context, Issue issue) {
   context.put("id", issue.getId());
   context.put("reference", issue.getReference());
   context.put("label", issue.getLabel());
   context.put("description", wiki2html(issue.getDescription()));
   context.put("statement", wiki2html(issue.getStatement()));
   context.put("statusText", issue.getStatusText());
   if (issue.isOwnerSet()) context.put("owner", issue.getOwner().getName());
   if (issue.isFixed()) context.put("fixed", "true");
   fillComments(context, issue);
 }
 @Override
 public void onConvertIssueToStory(GwtConversation conversation, String issueId) {
   Issue issue = issueDao.getById(issueId);
   Requirement story = requirementDao.postRequirement(issue);
   issue.appendToStatement("Created Story " + story.getReference() + " in Product Backlog.");
   issue.setCloseDate(Date.today());
   sendToClients(conversation, story);
   sendToClients(conversation, issue);
   User currentUser = conversation.getSession().getUser();
   postProjectEvent(
       conversation,
       currentUser.getName()
           + " created "
           + story.getReference()
           + " from "
           + issue.getReferenceAndLabel(),
       issue);
   changeDao.postChange(issue, currentUser, "storyId", null, story.getId());
   changeDao.postChange(story, currentUser, "issueId", null, issue.getId());
   subscriptionService.copySubscribers(issue, story);
   subscriptionService.notifySubscribers(
       story, "Story created from " + issue, conversation.getProject(), null);
 }