@Override public Issue updateIssue(ApplicationUser user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail) { return updateIssue( user, issue, UpdateIssueRequest.builder().eventDispatchOption(eventDispatchOption).sendMail(sendMail).build()); }
issue, UpdateIssueRequest.builder() .eventDispatchOption(eventDispatchOption) .sendMail(sendMail)
/** * @return true if there were any issues affected */ private boolean swapOrRemoveVersionsFromIssues(final ApplicationUser user, final Version version, final Option<Version> affectsSwapVersion, final Option<Version> fixSwapVersion) { final Set<Long> issuesIds = getAllAssociatedIssueIds(version); // swap the versions on the affected issues for (final Long issueId : issuesIds) { final MutableIssue newIssue = issueManager.getIssueObject(issueId); newIssue.setAffectedVersions(getNewVersions(version, newIssue.getAffectedVersions(), affectsSwapVersion)); newIssue.setFixVersions(getNewVersions(version, newIssue.getFixVersions(), fixSwapVersion)); final Issue updated = issueManager.updateIssue(user, newIssue, UpdateIssueRequest.builder(). eventDispatchOption(EventDispatchOption.ISSUE_UPDATED). sendMail(false).build()); try { // reindex all the affected issues issueIndexManager.reIndex(updated); } catch (final IndexException e) { log.warn("Could not reindex issue with id '" + issueId + "' after swapping versions", e); } } return issuesIds.size() > 0; }