public Long getParentId() { return issue.getParentId(); }
public Long getParentId() { return issue.getParentId(); }
public void addIndex(Document doc, Issue issue) { indexLongAsKeyword(doc, getDocumentFieldId(), issue.getParentId(), issue); } }
private Option<IssueRefJsonBean> createParentLink(final Issue issue) { final Long parentId = issue.getParentId(); if (parentId == null) { return Option.none(); } try { return Option.some(issueRefsCache.get(parentId, new Callable<IssueRefJsonBean>() { @Override public IssueRefJsonBean call() throws Exception { return issueLinkBeanBuilderFactory.newIssueLinksBeanBuilder(issue).buildParentLink(); } })); } catch (ExecutionException e) { throw new RuntimeException("Issue links to parent which does not exist."); } }
DeletedIssueEventData(IssueManager issueManager, CustomFieldManager customFieldManager, boolean sendMail, Long issueId) { if (issueId == null) { issue = null; customFieldValues = null; watchers = null; } else { issue = issueManager.getIssueObject(issueId); // don't remove, this inits thread-local cache! issue.getParentId(); customFieldValues = collectCustomFieldValues(customFieldManager); watchers = issueManager.getWatchers(issue); } this.sendMail = sendMail; }
/** * Retrieve a single issue via it's database id, throwing an exception if the user has no permissions * but not if it does not exist * * @param issue the possible child issue * @param user the user in play * @return an issue or null if its not a sub issue * @throws RemotePermissionException if the user cant see the parent issue in question */ private Issue retrieveParentIssue(Issue issue, User user) throws RemotePermissionException { final Long parentId = issue.getParentId(); if (parentId == null) { return null; } Issue parentIssue = issueManager.getIssueObject(parentId); if (parentIssue != null && !permissionManager.hasPermission(Permissions.BROWSE, parentIssue, user)) { throw new RemotePermissionException("This issue does not exist or you don't have permission to view it."); } return parentIssue; }
if (!inputIssuesById.containsKey(issue.getParentId())) final Long parentId = issue.getParentId(); final SubTaskingIssueDecorator issueDecorator; if (resultIssueMap.containsKey(parentId))
private boolean showIssue(Issue issue) { //if a project Id is specified, only show issues with the same project id if (selectedProjectId != null && !selectedProjectId.equals(issue.getProjectId())) { return false; } //if showSubTasks() is disabled don't show subtasks if (!showSubTasks && issue.isSubTask()) { return false; } if (currentIssue != null) { //Don't show the current issue. if (this.currentIssue.equals(issue.getKey())) { return false; } //if showSubTasksParent is disabled don't show the current issues parent final Issue currentIssue = getIssue(); if (currentIssue != null && !showSubTasksParent && currentIssue.isSubTask() && currentIssue.getParentId().equals(issue.getId())) { return false; } } return true; }
/** * Returns the parent of the current {@link com.atlassian.jira.issue.Issue} * * @return the parent issue object */ public Issue getParentIssueObject() { if (isSubTask()) { if (parentIssueObject == null) { final Issue issue = getIssueObject(); if (issue == null) { addErrorMessage(getText("admin.errors.current.issue.null")); return null; } parentIssueObject = getIssueManager().getIssueObject(issue.getParentId()); } } return parentIssueObject; }
setParentId(issue.getParentId()); initializeKey();
private boolean initParams() { SelectedProject entityLink = getSelectedDestinationProject(); JiraProxy proxy = jiraProxyFactory.createJiraProxy(entityLink.getJiraLocation()); Either<NegativeResponseStatus, CopyInformationBean> response = proxy.getCopyInformation( entityLink.getProjectKey()); copyInfo = handleGenericResponseStatus(proxy, response, null); if(copyInfo == null){ return false; } availableIssueTypes = getIssueTypeOptionsList(copyInfo.getIssueTypes()); // if we copy to the same project display also subtask types if(proxy.getJiraLocation().isLocal() && getIssueObject().getProjectObject().getKey().equals(entityLink.getProjectKey()) && getIssueObject().getParentId() != null) { availableSubTaskTypes = getIssueTypeOptionsList(copyInfo.getSubtaskIssueTypes()); } else { availableSubTaskTypes = Collections.emptyList(); } UserBean user = copyInfo.getRemoteUser(); remoteUserName = user.getUserName(); remoteFullUserName = copyInfo.getRemoteUser().getFullName(); return true; }