verifyLoggedIn();
DbSession session = dbClient.openSession(false);
try {
DefaultIssue defaultIssue = getByKeyForUpdate(session, issueKey).toDefaultIssue();
IssueChangeContext context = IssueChangeContext.createUser(new Date(), UserSession.get().login());
checkTransitionPermission(transitionKey, UserSession.get(), defaultIssue);
if (workflow.doTransition(defaultIssue, transitionKey, context)) {
saveIssue(session, defaultIssue, context, null);
}
return defaultIssue;