@Override protected String getInitialValue(Issue issue, ErrorCollection errors) { return issue.getReporterId(); }
@Override protected String getFieldValue(Issue issue) { return issue.getReporterId(); } }
@Override protected String getFieldValue(Issue issue) { return issue.getReporterId(); }
public String getReporterId() { return issue.getReporterId(); }
public String getReporterId() { return issue.getReporterId(); }
public boolean shouldDisplay(ApplicationUser user, Issue issue, JiraHelper jiraHelper) { final String reportId = issue.getReporterId(); return StringUtils.isNotBlank(reportId) && user != null && reportId.equals(user.getName()); }
@Override protected ChangeHistoryItem createInitialChangeItem(Issue issue) { final ApplicationUser reporter = issue.getReporter(); final String reporterName = reporter == null ? "" : issue.getReporter().getDisplayName(); final String reporterValue = issue.getReporterId() == null ? EMPTY_VALUE : issue.getReporterId(); return changeItemBuilder(issue).to(reporterName, reporterValue).build(); } }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { final Map<String, Object> velocityParams = getVelocityParams(getAuthenticationContext().getI18nHelper(), displayParams, issue); try { final String reporterUserId = issue.getReporterId(); if (reporterUserId != null) { velocityParams.put("reporterUserkey", reporterUserId); } } catch (DataAccessException e) { log.debug("Error occurred retrieving reporter", e); } return renderTemplate("reporter-columnview.vm", velocityParams); }
public List<NotificationRecipient> getRecipients(IssueEvent event, String argument) { Issue issue = event.getIssue(); if (issue != null) { final ApplicationUser user = ComponentAccessor.getUserManager().getUserByKey(issue.getReporterId()); String level = (String)event.getParams().get("level"); if ( user != null && (level == null || userInGroup(user, level)) ) { return Lists.newArrayList(new NotificationRecipient(user)); } else { //Guest reported or user not in the relevant level return Collections.emptyList(); } } else { LOG.error("Error getting reporter notification recipients - no issue associated with event: " + event.getEventTypeId()); } return Collections.emptyList(); }
public void addIndex(Document doc, Issue issue) { indexUserkeyWithDefault(doc, getDocumentFieldId(), issue.getReporterId(), SystemSearchConstants.forReporter().getEmptyIndexValue(), issue); } }
private boolean canVote(JiraActivityItem item) { Issue issue = item.getIssue(); try { return voteManager.isVotingEnabled() && !voteManager.hasVoted(authenticationContext.getUser(), issue) && issue.getResolution() == null && !issue.getReporterId().equals(authenticationContext.getUser().getKey()) && !item.getActivity().first().equals(ActivityObjectTypes.comment()); } catch (NullPointerException e) { if (log.isDebugEnabled()) { log.debug("Error checking if current user can vote on " + issue.getKey(), e); } return false; } }
protected ChangeHistoryItem.Builder changeItemBuilder(Issue issue) { return new ChangeHistoryItem.Builder() .withId(MINUS_1) .inChangeGroup(MINUS_1) .forIssue(issue.getId(), issue.getKey()) .inProject(issue.getProjectId()) .field(getField()) .on(issue.getCreated()) .byUser(issue.getReporterId() == null ? DocumentConstants.ISSUE_NO_AUTHOR : issue.getReporterId()); }
if (!returnedReporter.equals(issue.getReporterId()))
private VoteValidationResult validateVoting(final ApplicationUser remoteUser, final ApplicationUser voter, final Issue issue) { final ErrorCollection errors = new SimpleErrorCollection(); final I18nHelper i18n = beanFactory.getInstance(remoteUser); final VoteValidationResult result = new VoteValidationResult(errors, voter, issue); if (isAnonymous(remoteUser) || isAnonymous(voter)) { result.getErrorCollection().addErrorMessage(i18n.getText("issue.operations.voting.not.loggedin")); } if (!permissionManager.hasPermission(BROWSE_PROJECTS, issue, voter)) { result.getErrorCollection().addErrorMessage(i18n.getText("issue.operations.error.vote.issue.permission")); } final String reporterId = issue.getReporterId(); if (StringUtils.isNotBlank(reporterId) && voter != null && reporterId.equals(getKeyFor(voter))) { result.getErrorCollection().addErrorMessage(i18n.getText("issue.operations.novote")); } if (issue.getResolution() != null) { result.getErrorCollection().addErrorMessage(i18n.getText("issue.operations.voting.resolved")); } if (!applicationProperties.getOption(APKeys.JIRA_OPTION_VOTING)) { result.getErrorCollection().addErrorMessage(i18n.getText("issue.operations.voting.disabled")); } return result; } }
this.reporter = issue.getReporterId();
environment = issue.getEnvironment(); assigneeId = issue.getAssigneeId(); reporterId = issue.getReporterId(); creatorId = issue.getCreatorId(); dueDate = copyTimestampOrNullIfUnset(issue.getDueDate());