getLocalIssueKeyFromRemoteId

    Signature

    Helper nodeHelper
    Signature

    getLocalIssueKeyFromRemoteId (Long remoteIssueId)

    Description

    Finds a local issue key linked to a remote issue.

    Introduced in 2.4.0

    Parameters

    remoteIssueId The ID of the issue of the remote side.

    Example use

    You can use this method to synchronize sub-tasks from Jira to Azure DevOps, or between Azure DevOps instances.

    Outgoing sync (sending side)

    replica.parentId = issue.parentId

    Incoming sync(receiving side)

    if(replica.parentId){
    
        def localParent = syncHelper.getLocalIssueKeyFromRemoteId(replica.parentId.toLong())
    
        if(localParent){
            issue.parentId = localParent.id
        }
    }

    Note: Both the parent task and the sub-task must be in sync for the parent link to be created in the child issue.

    Comments

    • If no local issue is linked to the provided remote issue ID, the method will return null.