use of com.cloudogu.scm.review.comment.service.ExecutedTransition in project scm-review-plugin by scm-manager.
the class CommentEventMailTextResolver method getCommentModificationEventType.
private static CommentEventType getCommentModificationEventType(BasicComment newComment) {
List<ExecutedTransition> transitions = newComment.getExecutedTransitions();
Transition lastTransition = transitions.get(transitions.size() - 1).getTransition();
if (lastTransition == CommentTransition.MAKE_TASK) {
return CommentEventType.TASK_CREATED;
} else if (lastTransition == CommentTransition.SET_DONE) {
return CommentEventType.TASK_DONE;
} else if (lastTransition == CommentTransition.REOPEN) {
return CommentEventType.TASK_REOPEN;
} else if (lastTransition == CommentTransition.MAKE_COMMENT) {
return CommentEventType.COMMENT_CREATED;
} else {
log.trace("cannot handle changes of comment");
return null;
}
}
Aggregations