Dear All,
I can link issues in Cloud with Scriptrunner
https://library.adaptavist.com/entity/add-or-update-the-issue-link-for-an-issue-in-jira
but I haven't been able to find a way to remove an issue link.
I tried null here, but it didn't work:
def link = post('/rest/api/2/issueLink')
.header('Content-Type', 'application/json')
.body([
type: [ name: linkType ],
outwardIssue: [ key: null],
inwardIssue: [ key: null]
])
.asString()
Does anyone have any suggesstions?
Thank you!
It worked like this:
def link = delete('/rest/api/2/issueLink/'+linkId) .header('Content-Type', 'application/json') .asObject(Map)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, I'll try that!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vikrant Yadav I tried it and I get this:
2021-08-09 16:25:06.504 ERROR - groovy.lang.MissingMethodException: No signature of method: Script1.DELETE() is applicable for argument types: (String) values: [/rest/api/2/issueLink/25225]
It's like this:
def link = DELETE('/rest/api/2/issueLink/'+linkId)
.header('Content-Type', 'application/json')
.asString()
Thank you if you can have a look at this!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It worked like this:
def link = delete('/rest/api/2/issueLink/'+linkId) .header('Content-Type', 'application/json') .asObject(Map)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at this class from the link you provided.
com.atlassian.jira.issue.link.IssueLinkTypeManager
ComponentAccessor.issueLinkManager.removeIssueLinks(issue, currentUser)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, but I wrote CLOUD. Cloud groovy is different form server.
I'm aware of removeIssueLinks on server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.