@Override protected Issue transform(final Long o) { return issueManager.getIssueObject(o); } }, sink);
private Issue findIssue(final Long issueId) { final Issue issue = issueManager.getIssueObject(issueId); if (issue == null) { throw new IllegalArgumentException("Issue with id '" + issueId + "' no longer exists!"); } return issue; }
/** * Returns the Issue that this file is attached to. * @return the Issue that this file is attached to. */ public Issue getIssue() { return issueManager.getIssueObject(genericValue.getLong("issue")); }
public void foreach(final Consumer<Issue> sink) { for (Long id : ids) { MutableIssue issue = issueManager.getIssueObject(id); if (issue != null) { sink.consume(issue); } } }
/** * Find Issue by id. * * @param user * @param issueId * @return * @throws Exception */ public static Issue getIssue(Long issueId) { return getIssueManager().getIssueObject(issueId); }
@Override public Collection<Issue> getIssuesWithAffectsVersion(Version version) { Collection<Long> issueIds = getIssueIdsWithAffectsVersion(version); final Collection<Issue> issues = new ArrayList<Issue>(issueIds.size()); for (Long issueId : issueIds) { issues.add(issueManager.getIssueObject(issueId)); } return issues; }
public Collection<String> getPreviousIssueKeys(final Long issueId) { final Set<String> issueKeys = issueManager.getAllIssueKeys(issueId); final Issue issue = issueManager.getIssueObject(issueId); return ImmutableSet.copyOf(filter(issueKeys, not(equalTo(issue.getKey())))); }
public boolean hasPreviouslyWatched(String issueKey) { ApplicationUser user = authenticationContext.getLoggedInUser(); Issue issue = issueManager.getIssueObject(issueKey); return watcherManager.isWatching(user, issue); }
private Option<MutableIssue> getIssue(final EntityProperty entityProperty) { return Option.option(issueManager.getIssueObject(entityProperty.getEntityId())); } }
public Issue getParentObject() { if (isSubTask()) { return issueManager.getIssueObject(getParentId()); } return null; }
public String getCannotPerformMessageKey(MoveIssueBean moveIssueBean) { if (!(constantsManager.getSubTaskIssueTypeObjects().size() > 1)) { return CANNOT_PERFORM_MESSAGE_NO_SUBTASK; } final MutableIssue issue = issueManager.getIssueObject(moveIssueBean.getIssueId()); return hasProjectMoreThanOneSubTaskType(issue) ? CANNOT_PERFORM_MESSAGE_GENERIC : CANNOT_PERFORM_MESSAGE_NO_SUBTASK_IN_PROJECT; } }
public Collection<String> getPreviousIssueKeys(final String issueKey) { notNull("issueKey", issueKey); Issue theIssue = issueManager.getIssueObject(issueKey); if (theIssue == null) { return Collections.emptySet(); } return getPreviousIssueKeys(theIssue.getId()); }
public boolean canPerform(MoveIssueBean moveIssueBean, ApplicationUser remoteUser) { Long issueId = moveIssueBean.getIssueId(); PermissionManager permissionManager = ComponentAccessor.getPermissionManager(); return permissionManager.hasPermission(Permissions.MOVE_ISSUE, issueManager.getIssueObject(issueId), remoteUser); } }
@Override public IssueResult getIssue(@Nullable final ApplicationUser user, final Long issueId) { final I18nHelper i18n = getI18n(user); final MutableIssue issue = issueManager.getIssueObject(issueId); final SimpleErrorCollection errors = new SimpleErrorCollection(); return new IssueResult(getIssue(user, issue, i18n, errors), errors); }
@Override public IssueResult getIssue(@Nullable final ApplicationUser user, final String issueKey) { final I18nHelper i18n = getI18n(user); final MutableIssue issue = issueManager.getIssueObject(issueKey); final SimpleErrorCollection errors = new SimpleErrorCollection(); return new IssueResult(getIssue(user, issue, i18n, errors), errors); }
public String getIssuePath() { MutableIssue targetIssue = issueManager.getIssueObject(getIssue().getId()); targetIssue = issueFactory.cloneIssueNoParent(targetIssue); return "/browse/" + targetIssue.getKey(); }
protected MutableIssue getTargetIssueObjectWithSecurityLevel() { MutableIssue issue = super.getTargetIssueObjectWithSecurityLevel(); issue.setParentId(issueManager.getIssueObject(((ConvertIssueToSubTaskBean) getBean()).getParentIssueKey()).getId()); return issue; }
private void removeRemoteIssueLink(RemoteIssueLink remoteIssueLink, ApplicationUser user) { remoteIssueLinkStore.removeRemoteIssueLink(remoteIssueLink.getId()); final Issue issue = issueManager.getIssueObject(remoteIssueLink.getIssueId()); createChangeItemForRemove(remoteIssueLink, issue, user); eventPublisher.publish(new RemoteIssueLinkDeleteEvent(remoteIssueLink)); }
private Either<ErrorCollection, Issue> getIssueFromChangeHistory(final ChangeHistory changeGroup) { if (changeGroup != null && changeGroup.getIssueId() != null) { final Issue issueObject = issueManager.getIssueObject(changeGroup.getIssueId()); if (issueObject != null) { return Either.right(issueObject); } } final ErrorCollection issueNotFound = new SimpleErrorCollection(); issueNotFound.addErrorMessage(i18n.getText("issue.does.not.exist.title"), ErrorCollection.Reason.NOT_FOUND); return Either.left(issueNotFound); }
@Override public boolean shouldDisplay(RemoteIssueLink remoteIssueLink) { ApplicationUser user = jiraAuthenticationContext.getLoggedInUser(); Issue issue = issueManager.getIssueObject(remoteIssueLink.getIssueId()); return isIssueDefined(issue) && isProjectDefined(issue.getProjectObject()) && softwareLicenseVerifier.isAllowedForSoftwareUsers(issue.getProjectObject(), user) && permissionChecker.hasVersionControlPermissions(issue, user); }