Codota Logo
ChangeHistoryManager
Code IndexAdd Codota to your IDE (free)

How to use
ChangeHistoryManager
in
com.atlassian.jira.issue.changehistory

Best Java code snippets using com.atlassian.jira.issue.changehistory.ChangeHistoryManager (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.atlassian.streams/streams-jira-plugin

@Override
public IssueHistory next()
{
  Issue nextIssue = issues.next();
  List<ChangeHistory> nextChangeHistories = changeHistoryManager.getChangeHistoriesForUser(nextIssue, remoteUser);
  return new IssueHistory(nextIssue, ImmutableList.copyOf(nextChangeHistories));
}
origin: com.atlassian.jira.plugins/jira-fisheye-plugin

  public Collection<String> getOldIssueKeys(final String issueKey) {
    return changeHistoryManager.getPreviousIssueKeys(issueKey);
  }
}
origin: com.atlassian.jira/jira-core

@Override
public List<ChangeHistoryGroup> apply(final Issue issue)
{
  final List<ChangeHistoryItem> changeHistoryItems = changeManager.getAllChangeItems(issue);
  return newArrayList(createChangeGroupsFromChangeItems(changeHistoryItems, issue));
}
origin: com.atlassian.cpji/cpji-jira-plugin

public void clearChangeHistory(String issueKey) throws IssueNotFoundException{
  IssueService.IssueResult result = issueService.getIssue(callingUser(), issueKey);
  if (!result.isValid()) {
    throw new IssueNotFoundException(result.getErrorCollection());
  }
  changeHistoryManager.removeAllChangeItems(result.getIssue());
}
origin: com.atlassian.jira/jira-core

boolean createIssueLinkChangeItem(final String linkedIssueKey, final Issue issue)
{
  final List<ChangeItemBean> linkChangeItemsForIssue = changeHistoryManager.getChangeItemsForField(issue, "Link");
  // Run through all the change items for field Link and see if there is one for our key and if it has a corresponding
  // delete change item. We want to create the change item if:
  //   * there is no reference to the link
  //   * there is a reference to the link but there is also a reference to deleting the link
  boolean createItemFound = false;
  boolean deleteItemFound = false;
  for (ChangeItemBean changeItemBean : linkChangeItemsForIssue)
  {
    if (linkedIssueKey.equals(changeItemBean.getFrom()))
    {
      createItemFound = true;
    }
    else if (linkedIssueKey.equals(changeItemBean.getTo()))
    {
      deleteItemFound = true;
    }
  }
  return !createItemFound || deleteItemFound;
}
origin: com.atlassian.jira/jira-core

  @Override
  public Option<ChangeHistory> apply(@Nullable final Long input)
  {
    return Option.option(changeHistoryManager.getChangeHistoryById(input));
  }
};
origin: com.atlassian.streams/streams-jira-plugin

public Set<Issue> find(final ActivityRequest request)
{
  Collection<Project> projects = ImmutableSet.copyOf(getProjects(request));
  if (projects.isEmpty())
  {
    // If there are no projects then that means the user doesn't have permission to browse the requested project
    return ImmutableSet.of();
  }
  return ImmutableSet.copyOf(changeHistoryManager.findUserHistory(
      authenticationContext.getLoggedInUser(),
      getUsers(request),
      projects,
      request.getMaxResults()));
}
origin: com.atlassian.jira/jira-core

final Set<ApplicationUser> mentionedUsers = getMentionedUsers(mentionText, issue);
final List<ChangeHistory> allChangeHistories = changeHistoryManager.getChangeHistories(issue);
boolean containsDescriptionChanges = false;
if(!allChangeHistories.isEmpty())
origin: com.atlassian.jira/jira-core

removeIssueLinks(user, issue);
changeHistoryManager.removeAllChangeItems(issue);
deleteMovedIssueKeyHistory(issue);
removeIssueProperties(issue);
origin: com.atlassian.jira/jira-core

List<ChangeItemBean> assigneeHistory = getChangeHistoryManager().getChangeItemsForField(issue, "assignee");
origin: com.atlassian.streams/streams-jira-plugin

private Multimap<Issue, ChangeHistory> doGetChangeHistoriesForUser(Iterable<Issue> issues, ApplicationUser remoteUser)
    throws IllegalAccessException, InvocationTargetException
{
  List<ChangeHistory> histories = changeHistoryManager.getChangeHistoriesForUser(issues, remoteUser);
  // index the change histories by issue
  return Multimaps.index(histories, new ByIssueIndexer());
}
origin: com.atlassian.jira.plugins/jira-dvcs-connector-api

@SuppressWarnings("deprecation")
public static Set<String> getAllIssueKeys(IssueManager issueManager, ChangeHistoryManager changeHistoryManager, Issue issue) {
  if (GET_ALL_ISSUE_KEYS_EXISTS) {
    return issueManager.getAllIssueKeys(issue.getId());
  } else {
    Set<String> allIssueKeys = new HashSet<>();
    if (issue != null) {
      // adding current issue key
      allIssueKeys.add(issue.getKey());
      // Adding previous issue keys
      allIssueKeys.addAll(changeHistoryManager.getPreviousIssueKeys(issue.getId()));
    }
    return allIssueKeys;
  }
}
origin: com.atlassian.jira/jira-rest-plugin

  public ChangelogBean build(Issue issue)
  {
    List<ChangeHistory> allChangeHistories = changeHistoryManager.getChangeHistoriesForUser(issue, authContext.getUser());
    List<ChangelogBean.ChangeHistoryBean> histories = Lists.newArrayList();
    for (ChangeHistory changeHistoryItem : allChangeHistories)
    {
      histories.add(makeChangeHistoryBean(changeHistoryItem));
    }

    ChangelogBean changelog = new ChangelogBean();
    changelog.setStartAt(0);
    changelog.setMaxResults(histories.size());
    changelog.setTotal(histories.size());
    changelog.setHistories(histories);

    return changelog;
  }
}
origin: com.atlassian.jira/jira-core

@Override
public List<IssueAction> getActions(Issue issue, ApplicationUser remoteUser)
{
  boolean alwaysShowHeader = Boolean.valueOf(descriptor.getParams().get(ALWAYS_SHOW_HEADER));
  List<ChangeHistory> allChangeHistories = changeHistoryManager.getChangeHistoriesForUser(issue, remoteUser);
  List<IssueAction> changeHistoryActions = Lists.newArrayListWithCapacity(allChangeHistories.size());
  boolean first = true;
  changeHistoryActions.add(new IssueCreatedAction(descriptor, dateTimeFormatterFactory.formatter().forLoggedInUser(), userFormatManager, i18nHelper, avatarService, authenticationContext, issue));
  for (ChangeHistory changeHistoryItem : allChangeHistories)
  {
    final HistoryMetadataManager.HistoryMetadataResult historyMetadata = historyMetadataManager.getHistoryMetadata(changeHistoryItem, remoteUser);
    boolean showHeader = first || alwaysShowHeader;
    changeHistoryActions.add(new ChangeHistoryAction(descriptor, changeHistoryItem, showHeader, attachmentManager,
        jiraDurationUtils, customFieldManager, dateTimeFormatterFactory.formatter().forLoggedInUser(), issue, changeLogHelper, historyMetadata.getHistoryMetadata(),
        historyMetadataRenderHelper));
    first = false;
  }
  // This is a bit of a hack to indicate that there are no change history to display
  if (changeHistoryActions.isEmpty())
  {
    IssueAction action = new GenericMessageAction(descriptor.getI18nBean().getText("viewissue.nochanges"));
    return Lists.newArrayList(action);
  }
  Collections.sort(changeHistoryActions, IssueActionComparator.COMPARATOR);
  return changeHistoryActions;
}
com.atlassian.jira.issue.changehistoryChangeHistoryManager

Javadoc

Manages the change history of issues. TODO: expand this interface to include the functionality from ChangeLogUtils

Most used methods

  • getChangeHistoriesForUser
    Returns a List of ChangeHistory entities for multiple issues. This method is much more efficient tha
  • getPreviousIssueKeys
    Given an issue key, this method returns a list of previous issue keys this issue was moved from. Thi
  • removeAllChangeItems
    Remove all change items associated with an issue.
  • findUserHistory
    Find a list of issues that the given users have acted on with the option to limit the projects inclu
  • getAllChangeItems
    Returns a List of com.atlassian.jira.issue.changehistory.ChangeHistoryItem's for the given issue
  • getChangeHistories
    Returns a List of ChangeHistory entities
  • getChangeHistoryById
  • getChangeItemsForField
    Returns a List of ChangeItemBean's for the given issue which also are for the provided changeItemFie

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • JFrame (javax.swing)
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now