linkIssue is one of the more problematic actions in the JCLI. This is partly due to the lack of a good API on earlier Jira versions and some release specific differences in the new REST API behavior on later Jira releases. The changes forced incompatibilities in use scenarios. On the latest Jira releases (5.0 and above), it seems that things have stabilized. Another difficulty is that the error messaging is poor. This means that it is often hard to figure out what is actually wrong with the request. As the Jira REST APIs improve over time, it is hoped this problem can be decreased. You should be using a recent version of Jira CLI to cover fixes that have been made in this area (3.0 or above).
Information for Jira 5.x and above
There are some linkIssue examples here. This is the basic:
jira --action linkIssue --issue ZLINKS-1 --toIssue ZLINKS-2 --link "Relates"
The issue and toIssue actions must exist and be authorized for access. For instance:
jira --action getIssue --issue ZLINKS-1
- The link value must match exactly (case sensitive, blank sensitive) with the defined entry name.
- If you still have a problem, open an issue. Please provide:
- Command and output with --debug
- Output from getIssue for each issue
- Output from getLinkTypeList