public Timestamp getCreatedDate() { return changeHistory.getTimePerformed(); }
/** * @deprecated Use {@link #getAuthorObject()} instead. Since v6.0. * * Returns the author of this Change * @return the author of this Change */ public ApplicationUser getAuthorUser() { return getAuthorObject(); }
@SuppressWarnings("unchecked") private static Iterable<GenericValue> getUnfilteredChangeItems(ChangeHistory changeHistory) { return changeHistory.getChangeItems(); }
private ChangelogBean.ChangeHistoryBean makeChangeHistoryBean(ChangeHistory changeHistory) { List<ChangelogBean.ChangeItemBean> items = transform(changeHistory.getChangeItemBeans(), new Function<ChangeItemBean, ChangelogBean.ChangeItemBean>() { @Override public ChangelogBean.ChangeItemBean apply(ChangeItemBean from) { ChangelogBean.ChangeItemBean item = new ChangelogBean.ChangeItemBean(); item.setField(from.getField()); item.setFieldtype(from.getFieldType()); item.setFrom(from.getFrom()); item.setFromString(from.getFromString()); item.setTo(from.getTo()); item.setToString(from.getToString()); return item; } }); ChangelogBean.ChangeHistoryBean bean = new ChangelogBean.ChangeHistoryBean(); ApplicationUser author = changeHistory.getAuthorObject(); bean.setAuthor(userBeanFactory.createBean(author, authContext.getUser())); bean.setCreated(changeHistory.getTimePerformed()); bean.setId(changeHistory.getId().toString()); final HistoryMetadataManager.HistoryMetadataResult historyMetadata = historyMetadataManager.getHistoryMetadata(changeHistory, authContext.getUser()); if (historyMetadata.isValid() && historyMetadata.getHistoryMetadata() != null) { bean.setHistoryMetadata(historyMetadata.getHistoryMetadata()); } bean.setItems(items); return bean; }
if (containsDate.apply(changeHistory.getTimePerformed()) && inJiraActivities.apply(activity)) if (inUsers.apply(getUserNameFromApplicationUser(changeHistory.getAuthorObject()))) {
private static boolean areRelated(final ChangeHistory change, final Comment comment) { return StringUtils.equals(ApplicationUsers.getKeyFor(comment.getAuthorApplicationUser()), change.getAuthor()) && isCloseEnough(comment.getCreated().getTime(), change.getTimePerformed().getTime()); }
public boolean apply(final ChangeHistory input) { return input.getAuthorUser() != null; } };
/** * Returns the userkey of the author of this Change * @return the userkey of the author of this Change * * @deprecated Use {@link #getAuthorKey()} instead. Since v6.0. */ public String getAuthor() { return getAuthorKey(); }
public Long getId() { return changeHistory.getId(); }
/** * Returns the display name of the author of this Change * @return the display name of the author of this Change * @deprecated Use {@link #getAuthorDisplayName()} instead. Since v5.0. */ public String getFullName() { return getAuthorDisplayName(); }
public Issue getIssue() { return issueManager.getIssueObject(getIssueId()); }
final List<ChangeItemBean> changeItemBeans = last.getChangeItemBeans(); for (ChangeItemBean changeItemBean : changeItemBeans)
public String apply(final ChangeHistory from) { // We shouldn't need to do a null check, because it's just been done by the HAS_AUTHOR filter return from.getAuthorUser().getName(); } };
public String getAuthor() { return changeHistory.getAuthorKey(); }
@Override public HistoryMetadataManager.HistoryMetadataResult getHistoryMetadata(@Nonnull final ChangeHistory changeHistory, @Nullable final ApplicationUser user) { Assertions.notNull("changeHistory", changeHistory); final EntityPropertyService.PropertyResult property = changeHistoryPropertyService.getProperty(user, changeHistory.getId(), DefaultChangeHistoryManager.HISTORY_METADATA_KEY); return convertResult(property); }
public String getFullName() { return changeHistory.getAuthorDisplayName(); }
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 int compare(ChangeHistory item1, ChangeHistory item2) { return item1.getTimePerformed().compareTo(item2.getTimePerformed()); } };
public List getChangeItems() { return changeHistory.getChangeItems(); }
/** * Returns the display name of the author of this Change * @return the display name of the author of this Change */ public String getAuthorDisplayName() { final ApplicationUser author = getAuthorObject(); return (author != null) ? author.getDisplayName() : null; }