@Override public void onSendIssueReplyEmail( GwtConversation conversation, String issueId, String from, String to, String subject, String text) { assertProjectSelected(conversation); Issue issue = issueDao.getById(issueId); if (Str.isEmail(from)) { emailSender.sendEmail(conversation.getProject(), to, subject, text); } else { emailSender.sendEmail(from, to, subject, text); } User user = conversation.getSession().getUser(); postProjectEvent( conversation, user.getName() + " emailed a response to " + issue.getReferenceAndLabel(), issue); Change change = changeDao.postChange(issue, user, "@reply", null, text); conversation.sendToClient(change); }
@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); }