use of org.sonar.core.issue.IssueChangeContext in project sonarqube by SonarSource.
the class IssueService method setTags.
public Collection<String> setTags(String issueKey, Collection<String> tags) {
userSession.checkLoggedIn();
DbSession session = dbClient.openSession(false);
try {
DefaultIssue issue = issueFinder.getByKey(session, issueKey).toDefaultIssue();
IssueChangeContext context = IssueChangeContext.createUser(new Date(), userSession.getLogin());
if (issueFieldsSetter.setTags(issue, tags, context)) {
issueUpdater.saveIssue(session, issue, context, null);
}
return issue.tags();
} finally {
session.close();
}
}
Aggregations