You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-10Lines changed: 28 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1576,7 +1576,7 @@ try {
1576
1576
1577
1577
##### get remote issue link
1578
1578
1579
-
*[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-getRemoteIssueLinks)
1579
+
*[See Jira API reference](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-rest-api-3-issue-issueidorkey-remotelink-get)
1580
1580
1581
1581
```php
1582
1582
<?php
@@ -1602,7 +1602,7 @@ try {
1602
1602
1603
1603
##### create remote issue link
1604
1604
1605
-
*[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-getRemoteIssueLinks)
1605
+
*[See Jira API reference](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-rest-api-3-issue-issueidorkey-remotelink-post)
1606
1606
1607
1607
```php
1608
1608
<?php
@@ -1928,7 +1928,7 @@ try {
1928
1928
```
1929
1929
#### Create Issue Link
1930
1930
1931
-
[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issueLink-linkIssues)
1931
+
[See Jira API reference](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-links/#api-rest-api-3-issuelink-post)
1932
1932
1933
1933
The Link Issue Resource provides functionality to manage issue links.
1934
1934
@@ -1941,25 +1941,43 @@ use JiraCloud\IssueLink\IssueLinkService;
1941
1941
use JiraCloud\JiraException;
1942
1942
1943
1943
try {
1944
+
$doc = (new Document())
1945
+
->heading(1) // header level 1, can have child blocks (needs to be closed with `->end()`)
1946
+
->text('h1') // simple unstyled text, cannot have child blocks (no `->end()` needed)
1947
+
->end() // closes `heading` node
1948
+
->paragraph() // paragraph, can have child blocks (needs to be closed with `->end()`)
1949
+
->text('Issue Link ') // simple unstyled text
1950
+
->strong('By ') // text node embedding a `strong` mark
1951
+
->text(' REST ') // simple unstyled text
1952
+
->em('API')
1953
+
->end() // closes `paragraph` node
1954
+
;
1955
+
1956
+
$comment = new AtlassianDocumentFormat($doc);
1957
+
1944
1958
$il = new IssueLink();
1945
1959
1946
-
$il->setInwardIssue('TEST-258')
1947
-
->setOutwardIssue('TEST-249')
1948
-
->setLinkTypeName('Relates' )
1949
-
->setComment('Linked related issue via REST API.');
1950
-
1960
+
$inwardKey = 'TEST-162';
1961
+
$outwardKey = 'ST-3';
1962
+
1963
+
$il->setInwardIssueByKey($inwardKey)
1964
+
->setOutwardIssueByKey($outwardKey)
1965
+
->setLinkTypeName('Duplicate' )
1966
+
->setCommentAsADF($comment)
1967
+
;
1968
+
1951
1969
$ils = new IssueLinkService();
1952
1970
1953
1971
$ret = $ils->addIssueLink($il);
1954
-
1972
+
1955
1973
} catch (JiraCloud\JiraException $e) {
1956
1974
print('Error Occurred! ' . $e->getMessage());
1957
1975
}
1958
1976
```
1959
1977
1960
1978
#### Get Issue LinkType
1961
1979
1962
-
[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issueLinkType-getIssueLinkTypes)
1980
+
[See Jira API reference](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-link-types/#api-group-issue-link-types)
1963
1981
1964
1982
Rest resource to retrieve a list of issue link types.
0 commit comments