public Long getVotes() { return issue.getVotes(); }
public Long getVotes() { return issue.getVotes(); }
/** * Removes the issue with 0 votes from the given list. * Note: It also removes it if {@link com.atlassian.jira.issue.Issue#getVotes()} returns null. * * @param issues list of {@link com.atlassian.jira.issue.Issue} objects */ public static void filterIssuesWithNoVotes(List issues) { if (issues != null) { for (Iterator iterator = issues.iterator(); iterator.hasNext();) { final Long votes = ((Issue) iterator.next()).getVotes(); if (votes == null || NO_VOTES.equals(votes)) { iterator.remove(); } } } }
public void addIndex(final Document doc, final Issue issue) { indexLongAsPaddedKeywordWithDefault(doc, getDocumentFieldId(), issue.getVotes(), 0L, issue); } }
@Override public boolean hasVoted(ApplicationUser user, Issue issue) { if (user == null) { return false; } // For performance: if there are no votes for the issue then this dude didn't vote for it. return issue.getVotes() != 0 && getVotersCache().getUnchecked(issue.getId()).contains(user.getKey()); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { Map velocityParams = getVelocityParams(fieldLayoutItem, getAuthenticationContext().getI18nHelper(), displayParams, issue); velocityParams.put(getId(), issue.getVotes()); return renderTemplate("votes-columnview.vm", velocityParams); }
public SimpleVoteHistory(Issue issue) { voteHistory.add(new VoteHistoryEntryImpl(issue.getId(), issue.getCreated(), 0)); voteHistory.addAll(voteManager.getVoteHistory(issue)); voteHistory.add(new VoteHistoryEntryImpl(issue.getId(), new Timestamp(System.currentTimeMillis()), issue.getVotes())); numberOfDays = Days.daysBetween(new DateMidnight(issue.getCreated()), new DateMidnight()).getDays() + 1; }
final VoteBean voteBean = new VoteBean(selfUri, hasVoted, issue.getVotes(), voters); return Response.ok(voteBean).cacheControl(never()).build();
@Override public FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequired, FieldLayoutItem fieldLayoutItem) { VoteManager voteManager = ComponentAccessor.getVoteManager(); if (voteManager.isVotingEnabled()) { return new FieldJsonRepresentation(new JsonData(VotesJsonBean.shortBean(issue.getKey(), issue.getVotes(), voteManager.hasVoted(authenticationContext.getUser(), issue), jiraBaseUrls))); } return null; } }
this.votes = issue.getVotes();
estimate = issue.getEstimate(); timespent = issue.getTimeSpent(); votes = returnZeroIfNull(issue.getVotes()); watches = issue.getWatches();