@Override public boolean hasIssuePermissions() { // For workflow-based permissions, we need the issue and a known type to look up a workflow return (issue != null && issue.getIssueTypeObject() != null); } }
public IssueType getIssueTypeObject() { return issue.getIssueTypeObject(); }
protected IssueConstant getConstant(Issue i1) { IssueType issueType = i1.getIssueTypeObject(); if (issueType == null) return null; else return issueType; } }
public boolean hasValue(Issue issue) { return (issue.getIssueTypeObject() != null); }
@Override public boolean isHasCreatedIssue() { return issue != null && issue.getIssueTypeObject() != null; }
public IssueType getIssueTypeObject() { return issue.getIssueTypeObject(); }
Collection<IssueType> getSubtaskIssueTypes() { Set<IssueType> types = new HashSet<IssueType>(); Collection<? extends Issue> subtasks = getSubtaskObjects(); for (Issue subTask : subtasks) { types.add(subTask.getIssueTypeObject()); } return types; } }
public String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, issue, displayParameters); // Create issue type object IssueType issueType = issue.getIssueTypeObject(); velocityParams.put("issueTypeObject", issueType); return getViewHtml(velocityParams); }
public TransitionMetaFieldBeanBuilder(final FieldScreenRendererFactory fieldScreenRendererFactory, final FieldLayoutManager fieldLayoutManager, ActionDescriptor action, final Issue issue, final ApplicationUser user, VersionBeanFactory versionBeanFactory, VelocityRequestContextFactory velocityRequestContextFactory, ContextUriInfo contextUriInfo, JiraBaseUrls baseUrls) { super(fieldLayoutManager, issue.getProjectObject(), issue, issue.getIssueTypeObject(), user, versionBeanFactory, velocityRequestContextFactory, contextUriInfo, baseUrls, null); this.action = action; fieldScreenRenderer = fieldScreenRendererFactory.getFieldScreenRenderer(user, issue, action); }
public boolean apply(Issue issue) { return issue != null && isAndNot(request.getProviderFilters().get(ISSUE_TYPE)).apply(issue.getIssueTypeObject().getId()); } };
public Iterable<FieldLayoutItem> getAllVisibleFieldLayoutItems(final Issue issue) { return getAllVisibleFieldLayoutItems(issue.getProjectObject(), issue.getIssueTypeObject()); }
@Override Optional<Long> getEntityId(final Map<String, Object> context) { return get(context, "issue", Issue.class).map(issue -> IssueTypeWithID.fromIssueType(issue.getIssueTypeObject()).getId()); } }
private Context(Issue issue) { final Project projectObject = issue.getProjectObject(); this.project = projectObject != null ? projectObject.getId() : null; final IssueType issueType = issue.getIssueTypeObject(); this.issueType = issueType != null ? issueType.getId() : null; }
public AbstractIssueSkeleton(Issue issue) { this.type = issue.getIssueTypeObject(); this.key = issue.getKey(); this.summary = issue.getSummary(); this.priority = issue.getPriorityObject(); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { Map<String, Object> velocityParams = getVelocityParams(getAuthenticationContext().getI18nHelper(), displayParams, issue); velocityParams.put("issue", issue); // Create issue type object IssueType issueType = issue.getIssueTypeObject(); velocityParams.put(getId(), issueType); return renderTemplate("issuetype-columnview.vm", velocityParams); }
public void addIndex(Document doc, Issue issue) { IssueType issueTypeObject = issue.getIssueTypeObject(); if (issueTypeObject != null) // this should only be null in tests { indexKeyword(doc, getDocumentFieldId(), issueTypeObject.getId(), issue); } } }
@Override public FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequired, FieldLayoutItem fieldLayoutItem) { return new FieldJsonRepresentation(new JsonData(IssueTypeJsonBean.shortBean(issue.getIssueTypeObject(), jiraBaseUrls))); }
private List<SearchMatch> transformResults(final Collection<Issue> issues) { final List<SearchMatch> matches = new ArrayList<SearchMatch>(); for (Issue issue : issues) { matches.add(new BasicSearchMatch(applicationProperties.getBaseUrl() + "/browse/" + issue.getKey(), "[" + issue.getKey() + "] " + issue.getSummary(), issue.getDescription(), new BasicResourceType(applicationProperties, issue.getIssueTypeObject().getId()))); } return matches; }
public boolean isVisible(Issue issue, String fieldname) throws FieldLayoutStorageException { FieldLayout fieldLayout = fieldLayoutManager.getFieldLayout(issue.getProject(), issue.getIssueTypeObject().getId()); return !fieldLayout.getFieldLayoutItem(fieldManager.getOrderableField(fieldname)).isHidden(); }
private IssuePickerIssue getIssue(Issue issue, IssuePickerResults result) { DelimeterInserter delimeterInserter = new DelimeterInserter("<b>", "</b>"); // Lets assume that anything that has one of the following one char before it, is a new word. delimeterInserter.setConsideredWhitespace("-_/\\,.+=&^%$#*@!~`'\":;<>"); final String[] keysTerms = result.getKeyTerms().toArray(new String[result.getKeyTerms().size()]); final String[] summaryTerms = result.getSummaryTerms().toArray(new String[result.getSummaryTerms().size()]); final String issueKey = delimeterInserter.insert(TextUtils.htmlEncode(issue.getKey()), keysTerms); final String issueSummary = delimeterInserter.insert(TextUtils.htmlEncode(issue.getSummary()), summaryTerms); return new IssuePickerIssue(issue.getKey(), issueKey, getIconURI(option(issue.getIssueTypeObject())), issueSummary, issue.getSummary()); }