jira.js
    Preparing search index...

    Function linkIssues

    • Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have Issue Linking enabled.

      This resource returns nothing on the creation of an issue link. To obtain the ID of the issue link, use https://your-domain.atlassian.net/rest/api/3/issue/[linked issue key]?fields=issuelinks.

      If the link request duplicates a link, the response indicates that the issue link was created. If the request included a comment, the comment is added.

      This operation can be accessed anonymously.

      Permissions required:

      • Browse project project permission for all the projects containing the issues to be linked,
      • Link issues project permission on the project containing the from (outward) issue,
      • If issue-level security is configured, issue-level security permission to view the issue.
      • If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.

      Parameters

      • client: Client
      • parameters: {
            comment?: {
                author?: {
                    accountId?: string;
                    accountType?: string;
                    active?: boolean;
                    avatarUrls?: {
                        "16x16"?: string;
                        "24x24"?: string;
                        "32x32"?: string;
                        "48x48"?: string;
                        [key: string]: unknown;
                    };
                    displayName?: string;
                    emailAddress?: string;
                    self?: string;
                    timeZone?: string;
                    [key: string]: unknown;
                };
                body?: {
                    content: Record<string, any>[];
                    type: string & {} | "doc";
                    version: number;
                    [key: string]: unknown;
                };
                created?: unknown;
                id?: string;
                jsdAuthorCanSeeRequest?: boolean;
                jsdPublic?: boolean;
                properties?: { key?: string; value?: unknown; [key: string]: unknown }[];
                renderedBody?: string;
                self?: string;
                updateAuthor?: {
                    accountId?: string;
                    accountType?: string;
                    active?: boolean;
                    avatarUrls?: {
                        "16x16"?: string;
                        "24x24"?: string;
                        "32x32"?: string;
                        "48x48"?: string;
                        [key: string]: unknown;
                    };
                    displayName?: string;
                    emailAddress?: string;
                    self?: string;
                    timeZone?: string;
                    [key: string]: unknown;
                };
                updated?: unknown;
                visibility?: {
                    identifier?: string
                    | null;
                    type?: "role" | "group" | string & {};
                    value?: string;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            inwardIssue: {
                fields?: {
                    assignee?: {
                        accountId?: string;
                        accountType?: string;
                        active?: boolean;
                        avatarUrls?: {
                            "16x16"?: string;
                            "24x24"?: string;
                            "32x32"?: string;
                            "48x48"?: string;
                            [key: string]: unknown;
                        };
                        displayName?: string;
                        emailAddress?: string;
                        self?: string;
                        timeZone?: string;
                        [key: string]: unknown;
                    };
                    issuetype?: {
                        avatarId?: number;
                        description?: string;
                        entityId?: string;
                        hierarchyLevel?: number;
                        iconUrl?: string;
                        id?: string;
                        name?: string;
                        scope?: {
                            project?: {
                                avatarUrls?: (...)
                                | (...);
                                id?: (...) | (...);
                                key?: (...) | (...);
                                name?: (...) | (...);
                                projectCategory?: (...) | (...);
                                projectTypeKey?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                self?: (...) | (...);
                                simplified?: (...) | (...) | (...);
                                [key: string]: unknown;
                            };
                            type?: string & {}
                            | "PROJECT"
                            | "TEMPLATE";
                            [key: string]: unknown;
                        };
                        self?: string;
                        subtask?: boolean;
                        untranslatedName?: string;
                        [key: string]: unknown;
                    };
                    issueType?: {
                        avatarId?: number;
                        description?: string;
                        entityId?: string;
                        hierarchyLevel?: number;
                        iconUrl?: string;
                        id?: string;
                        name?: string;
                        scope?: {
                            project?: {
                                avatarUrls?: (...)
                                | (...);
                                id?: (...) | (...);
                                key?: (...) | (...);
                                name?: (...) | (...);
                                projectCategory?: (...) | (...);
                                projectTypeKey?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                self?: (...) | (...);
                                simplified?: (...) | (...) | (...);
                                [key: string]: unknown;
                            };
                            type?: string & {}
                            | "PROJECT"
                            | "TEMPLATE";
                            [key: string]: unknown;
                        };
                        self?: string;
                        subtask?: boolean;
                        untranslatedName?: string;
                        [key: string]: unknown;
                    };
                    priority?: {
                        avatarId?: number;
                        description?: string;
                        iconUrl?: string;
                        id?: string;
                        isDefault?: boolean;
                        name?: string;
                        schemes?: {
                            maxResults?: number;
                            startAt?: number;
                            total?: number;
                            [key: string]: unknown;
                        };
                        self?: string;
                        statusColor?: string;
                        [key: string]: unknown;
                    };
                    status?: {
                        description?: string;
                        iconUrl?: string;
                        id?: string;
                        name?: string;
                        scope?: {
                            project?: {
                                avatarUrls?: (...)
                                | (...);
                                id?: (...) | (...);
                                key?: (...) | (...);
                                name?: (...) | (...);
                                projectCategory?: (...) | (...);
                                projectTypeKey?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                self?: (...) | (...);
                                simplified?: (...) | (...) | (...);
                                [key: string]: unknown;
                            };
                            type?: string & {}
                            | "PROJECT"
                            | "TEMPLATE";
                            [key: string]: unknown;
                        };
                        self?: string;
                        statusCategory?: {
                            colorName?: string;
                            id?: number;
                            key?: string;
                            name?: string;
                            self?: string;
                            [key: string]: unknown;
                        };
                        untranslatedName?: string;
                        [key: string]: unknown;
                    };
                    summary?: string;
                    timetracking?: {
                        originalEstimate?: string;
                        originalEstimateSeconds?: number;
                        remainingEstimate?: string;
                        remainingEstimateSeconds?: number;
                        timeSpent?: string;
                        timeSpentSeconds?: number;
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                id?: string;
                key?: string;
                self?: string;
                [key: string]: unknown;
            };
            outwardIssue: {
                fields?: {
                    assignee?: {
                        accountId?: string;
                        accountType?: string;
                        active?: boolean;
                        avatarUrls?: {
                            "16x16"?: string;
                            "24x24"?: string;
                            "32x32"?: string;
                            "48x48"?: string;
                            [key: string]: unknown;
                        };
                        displayName?: string;
                        emailAddress?: string;
                        self?: string;
                        timeZone?: string;
                        [key: string]: unknown;
                    };
                    issuetype?: {
                        avatarId?: number;
                        description?: string;
                        entityId?: string;
                        hierarchyLevel?: number;
                        iconUrl?: string;
                        id?: string;
                        name?: string;
                        scope?: {
                            project?: {
                                avatarUrls?: (...)
                                | (...);
                                id?: (...) | (...);
                                key?: (...) | (...);
                                name?: (...) | (...);
                                projectCategory?: (...) | (...);
                                projectTypeKey?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                self?: (...) | (...);
                                simplified?: (...) | (...) | (...);
                                [key: string]: unknown;
                            };
                            type?: string & {}
                            | "PROJECT"
                            | "TEMPLATE";
                            [key: string]: unknown;
                        };
                        self?: string;
                        subtask?: boolean;
                        untranslatedName?: string;
                        [key: string]: unknown;
                    };
                    issueType?: {
                        avatarId?: number;
                        description?: string;
                        entityId?: string;
                        hierarchyLevel?: number;
                        iconUrl?: string;
                        id?: string;
                        name?: string;
                        scope?: {
                            project?: {
                                avatarUrls?: (...)
                                | (...);
                                id?: (...) | (...);
                                key?: (...) | (...);
                                name?: (...) | (...);
                                projectCategory?: (...) | (...);
                                projectTypeKey?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                self?: (...) | (...);
                                simplified?: (...) | (...) | (...);
                                [key: string]: unknown;
                            };
                            type?: string & {}
                            | "PROJECT"
                            | "TEMPLATE";
                            [key: string]: unknown;
                        };
                        self?: string;
                        subtask?: boolean;
                        untranslatedName?: string;
                        [key: string]: unknown;
                    };
                    priority?: {
                        avatarId?: number;
                        description?: string;
                        iconUrl?: string;
                        id?: string;
                        isDefault?: boolean;
                        name?: string;
                        schemes?: {
                            maxResults?: number;
                            startAt?: number;
                            total?: number;
                            [key: string]: unknown;
                        };
                        self?: string;
                        statusColor?: string;
                        [key: string]: unknown;
                    };
                    status?: {
                        description?: string;
                        iconUrl?: string;
                        id?: string;
                        name?: string;
                        scope?: {
                            project?: {
                                avatarUrls?: (...)
                                | (...);
                                id?: (...) | (...);
                                key?: (...) | (...);
                                name?: (...) | (...);
                                projectCategory?: (...) | (...);
                                projectTypeKey?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                self?: (...) | (...);
                                simplified?: (...) | (...) | (...);
                                [key: string]: unknown;
                            };
                            type?: string & {}
                            | "PROJECT"
                            | "TEMPLATE";
                            [key: string]: unknown;
                        };
                        self?: string;
                        statusCategory?: {
                            colorName?: string;
                            id?: number;
                            key?: string;
                            name?: string;
                            self?: string;
                            [key: string]: unknown;
                        };
                        untranslatedName?: string;
                        [key: string]: unknown;
                    };
                    summary?: string;
                    timetracking?: {
                        originalEstimate?: string;
                        originalEstimateSeconds?: number;
                        remainingEstimate?: string;
                        remainingEstimateSeconds?: number;
                        timeSpent?: string;
                        timeSpentSeconds?: number;
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                id?: string;
                key?: string;
                self?: string;
                [key: string]: unknown;
            };
            type: {
                id?: string;
                inward?: string;
                name?: string;
                outward?: string;
                self?: string;
                [key: string]: unknown;
            };
        }
      • Optionaloptions: RequestOptions

      Returns Promise<void>