This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Issue Links in JIRA
Overview
The following operations allow you to work with issue links. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with issue links, see Sample configuration.
Operation | Description |
---|---|
Creates an issue link between two issues. | |
getIssueLinkById | Retrieves an issue link with the specified ID. |
Operation details
This section provides further details on the operations related to issue links.
Creating an issue link between two issues
The createIssueLink operation creates an issue link between two issues.
<jira.createIssueLink> <typeName>{$ctx:typeName}</typeName> <inwardIssueKey>{$ctx:inwardIssueKey}</inwardIssueKey> <outwardIssueKey>{$ctx:outwardIssueKey}</outwardIssueKey> <commentBody>{$ctx:commentBody}</commentBody> <commentVisibility>{$ctx:commentVisibility}</commentVisibility> </jira.createIssueLink>
Properties
Name of the issue type.typeName:
Key of the inward issue.inwardIssueKey:
Key of the outward issue.outwardIssueKey:
Body of the comment.commentBody:
Visibility of the comment.commentVisibility:
Sample request
Following is a sample REST/JSON request that can be handled by the createIssueLink
operation.
{ "uri": "https://connector.atlassian.net", "username": "admin", "password": "1qaz2wsx@", "typeName": "Duplicate", "inwardIssueKey": "TESTPM1-1", "outwardIssueKey": "TESTPM1-2", "commentBody": "Linked related issue!", "commentVisibility": { "type": "group", "value": "jira-users" } }
Related JIRA API
https://developer.atlassian.com/static/rest/jira/6.1.html#d2e1898
Retrieving an issue link with the specified ID
The
operation retrieves an issue link with the specified ID.getIssueLinkById
<jira.getIssueLinkById> <linkId>{$ctx:linkId}</linkId> </jira.getIssueLinkById>
Properties
The issue link ID.linkId:
Sample request
Following is a sample REST/JSON request that can be handled by the getIssueLinkById
operation.
{ "uri": "https://connector.atlassian.net", "username": "admin", "password": "1qaz2wsx@", "linkId": "10101" }
Related JIRA API
https://developer.atlassian.com/static/rest/jira/5.0.html#id199057
Sample configuration
Following is a sample proxy service that illustrates how to connect to JIRA with the init
operation and use the createIssueLink
operation. The sample request for this proxy can be found in the createIssueLink sample request.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="jira_createIssueLink" transports="https" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="uri" expression="json-eval($.uri)" /> <property name="username" expression="json-eval($.username)" /> <property name="password" expression="json-eval($.password)" /> <property name="typeName" expression="json-eval($.typeName)" /> <property name="inwardIssueKey" expression="json-eval($.inwardIssueKey)" /> <property name="outwardIssueKey" expression="json-eval($.outwardIssueKey)" /> <property name="commentBody" expression="json-eval($.commentBody)" /> <property name="commentVisibility" expression="json-eval($.commentVisibility)" /> <jira.init> <uri>{$ctx:uri}</uri> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </jira.init> <jira.createIssueLink> <typeName>{$ctx:typeName}</typeName> <inwardIssueKey>{$ctx:inwardIssueKey}</inwardIssueKey> <outwardIssueKey>{$ctx:outwardIssueKey}</outwardIssueKey> <commentBody>{$ctx:commentBody}</commentBody> <commentVisibility>{$ctx:commentVisibility}</commentVisibility> </jira.createIssueLink> <respond /> </inSequence> <outSequence> <send /> </outSequence> </target> <description /> </proxy>