Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning

The availability of the users personal data may be impacted by the recent changes by Atlassian in order to meet GDPR compliance. See the following for more information:

  • This routine is available starting with katl-commons 1.0.
  • This routine is available for Jira server and cloud deployment options
    Info
    titleAvailability
    Table plus
    applyColStyleToCelltrue
    heading0
    columnTypess,s,s,s
    multiplefalse
    columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
    enableSortingfalse

    Syntax

    cloneIssue(issueKey, [issueLinkTypeName [, newParentKey]])

    Package

    Alias

    Pkg Usage

    Description

    Excerpt
    hiddentrue
    Duplicates the issue and returns the key of the duplicated issue. If specified, it also creates a link to the duplicated issue.

    Starting with katl-commons version 2.5.15 / 2.6.7 it accepts a 3rd parameter. However beware that using this parameter you can create subtasks in certain other projects and create infinite subtasks. This may render Jira unusable. Make sure the parent and the subtask will be in the same project. Make sure you do not create a subtask with another subtask as parent.

    Cloud description

    ...

    Duplicates the issue and returns the key of the duplicated issue. If specified, it also creates a link to the duplicated issue.

    ...

    In the cloud version an error is returned if there is a newParentKey and the issue identified by the issuekey is not a subtask.

    ...

    Parameters

    Table plus
    applyColStyleToCelltrue
    columnTypess,s,s,s
    heading0
    multiplefalse
    enableSortingfalse

    Parameter name

    Type

    Required

    Description

    issuekey

    ...

    String

    Yes

    Key of the issue that has to be cloned.

    issueLinkTypeName

    ...

    String

    No

    Link to the duplicated issue.

    newParentKey

    ...

    String

    No

    New parent, if subtask.

    Return

    ...

    Type

    stringString

    The return value represents the key of the duplicated issue.

    ...

    Examples

    Example 1

    Code Block
    cloneIssue("PRJ-343");
    //"PRJ-343" represents the key of the issue that will be duplicated.
    

    Result: Issue PRJ-343 is duplicated.

    ...

    Code Block
    cloneIssue("PRJ-267","Cloned Issue")
    

    Result: Issue PRJ-267 is duplicated and a link named Cloned Issue to the duplicated issue is created.

    Note

    Please beware that using the "newParentKey" parameter can create subtasks in other projects and create infinite subtasks. This may render Jira unusable. Make sure the parent and the subtask will be in the same project. Make sure you do not create a subtask with another subtask as parent.

    See also

     

    Filter by label (Content by label)
    showLabelsfalse
    max25
    showSpacefalse
    cqllabel = "issue_routine" and space = currentSpace ( )
    labelsissue_routine

     

    array_routines