congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IssueLinkManager.createIssueLink
Code IndexAdd Tabnine to your IDE (free)

How to use
createIssueLink
method
in
com.atlassian.jira.issue.link.IssueLinkManager

Best Java code snippets using com.atlassian.jira.issue.link.IssueLinkManager.createIssueLink (Showing top 8 results out of 315)

origin: com.atlassian.jira/jira-core

@Override
public void createSubTaskIssueLink(Issue parentIssue, Issue subTaskIssue, ApplicationUser remoteUser) throws CreateException
{
  if (parentIssue == null)
  {
    throw new IllegalArgumentException("Parent Issue cannot be null.");
  }
  else if (subTaskIssue == null)
  {
    throw new IllegalArgumentException("Sub-Task Issue cannot be null.");
  }
  // Determine the next sequence of the issue
  final Collection subTaskIssueLinks = getSubTaskIssueLinks(parentIssue.getId());
  // Determine the sequence of the new sub-task link
  final long sequence = subTaskIssueLinks == null ? 0 : subTaskIssueLinks.size();
  issueLinkManager.createIssueLink(parentIssue.getId(), subTaskIssue.getId(), getSubTaskIssueLinkType().getId(), sequence, remoteUser);
}
origin: com.atlassian.cpji/cpji-jira-plugin

@Override
public Either<NegativeResponseStatus, SuccessfulResponse> copyLocalIssueLink(Issue localIssue, String remoteIssueKey, Long remoteIssueId, SimplifiedIssueLinkType issueLinkType, LinkCreationDirection localDirection, LinkCreationDirection remoteDirection) {
  try {
    //In contrary to remote links, local are always created in both directions so is is not possible to create only one-way local link.
    //So here we care only local direction (ie creating link from source issue)
    if (localDirection == LinkCreationDirection.OUTWARD) {
      issueLinkManager.createIssueLink(localIssue.getId(), remoteIssueId, issueLinkType.getId(), null, jiraAuthenticationContext.getLoggedInUser());
    } else if (localDirection == LinkCreationDirection.INWARD) {
      issueLinkManager.createIssueLink(remoteIssueId, localIssue.getId(), issueLinkType.getId(), null, jiraAuthenticationContext.getLoggedInUser());
    }
    return SuccessfulResponse.buildEither(jiraLocation);
  } catch (CreateException e) {
    return Either.left(NegativeResponseStatus.errorOccured(jiraLocation, e.getMessage()));
  }
}
origin: com.atlassian.jira/jira-issue-link-remote-jira-plugin

private void createLocalLink(final IssueLinkType linkType, final MutableIssue destinationIssue)
{
  try
  {
    if (linkDesc.equals(linkType.getOutward()))
    {
      issueLinkManager.createIssueLink(getIssue().getLong("id"), destinationIssue.getId(), linkType.getId(), null, getLoggedInUser());
    }
    else
    {
      issueLinkManager.createIssueLink(destinationIssue.getId(), getIssue().getLong("id"), linkType.getId(), null, getLoggedInUser());
    }
  }
  catch (Exception e)
  {
    log.error("Error occurred creating link: " + e, e);
    addErrorMessage(getText("admin.errors.issues.an.error.occured", e));
  }
}
origin: com.atlassian.jira/jira-core

private void linkIssue(IssueLinkType linkType, MutableIssue destinationIssue)
{
  try
  {
    if (linkDesc.equals(linkType.getOutward()))
    {
      issueLinkManager.createIssueLink(getIssue().getLong("id"), destinationIssue.getId(), linkType.getId(), null, getLoggedInUser());
    }
    else
    {
      issueLinkManager.createIssueLink(destinationIssue.getId(), getIssue().getLong("id"), linkType.getId(), null, getLoggedInUser());
    }
    userHistoryManager.addItemToHistory(ISSUELINKTYPE, getLoggedInUser(), valueOf(linkType.getId()), linkDesc);
  }
  catch (Exception e)
  {
    log.error("Error occurred creating link: " + e, e);
    addErrorMessage(getText("admin.errors.issues.an.error.occured", e));
  }
}
origin: com.atlassian.jira/jira-core

issueLinkManager.createIssueLink(workingIssueId, cloneIssue.getId(), issueLink.getIssueLinkType().getId(), null,
    getLoggedInUser());
issueLinkManager.createIssueLink(cloneIssue.getId(), workingIssueId, issueLink.getIssueLinkType().getId(), null,
    getLoggedInUser());
origin: com.atlassian.jira/jira-core

private void linkCloningIssueToOriginalOne(final Issue cloneIssue) throws CreateException
{
  // Record the mapping from old ID to new ID
  newIssueIdMap.put(getOriginalIssue().getId(), cloneIssue.getId());
  // Create link between the cloned issue and the original - sequence on links does not matter.
  final IssueLinkType cloneIssueLinkType = getCloneIssueLinkType();
  if (cloneIssueLinkType != null)
  {
    issueLinkManager.createIssueLink(getIssue().getLong("id"), getOriginalIssue().getId(), cloneIssueLinkType.getId(), null,
        getLoggedInUser());
  }
}
origin: com.atlassian.jira/jira-core

issueLinkManager.createIssueLink(sourceIssue.getId(), destinationIssue.getId(), linkType.getId(), null, result.getUser());
issueLinkManager.createIssueLink(destinationIssue.getId(), sourceIssue.getId(), linkType.getId(), null, result.getUser());
origin: com.atlassian.jira/jira-rest-plugin

try
  issueLinkManager.createIssueLink(inwardIssue.getId(), outwardIssue.getId(), linkType.getId(), null, authContext.getUser());
  issueLinkId = issueLinkManager.getIssueLink(inwardIssue.getId(), outwardIssue.getId(), linkType.getId()).getId();
com.atlassian.jira.issue.linkIssueLinkManagercreateIssueLink

Javadoc

Constructs a new issuelink from the sourceIssueId to the destinationId and persists it. This operation will cause a re-index of the associated issues.

Popular methods of IssueLinkManager

  • getIssueLink
    Retrieves an issue link given a source, destination and a link type.
  • isLinkingEnabled
    Returns whether Issue Linking is currently enabled in JIRA. Issue Linking can be enabled or disabled
  • getInwardLinks
    Get links to an issue.
  • getLinkCollection
    Constructs a LinkCollection for a given issue.
  • getOutwardLinks
    Get links from an issue.
  • changeIssueLinkType
    Changes the type of an issue link.NOTE: It is not possible to convert a system link type to a non-sy
  • clearCache
    Clears the Issue Link cache used by the Issue Link Manager.
  • getIssueLinks
    Returns a collection of all IssueLinks for a particular issue link type
  • getLinkCollectionOverrideSecurity
    Constructs a LinkCollection for a given issue, ignoring security.
  • moveIssueLink
    Moves an issue link to a different position in the list of issuelink.NOTE: This is currently only us
  • removeIssueLink
    Removes a single issue link We do not check for permission here. It should be done before this metho
  • removeIssueLinksNoChangeItems
    Removes ALL incoming and outgoing issuelinks from the issue supplied without creating ChangeItems fo
  • removeIssueLink,
  • removeIssueLinksNoChangeItems,
  • resetSequences

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now