I need to remove a link from an issue using automation, and I prefer not to use Jira plug-ins to do that. I have found some documentation that explains how to add a link using Json.
https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
{"update": { "issuelinks": [ { "add": { "type": { "name": "Relates" }, "outwardIssue": { "key": "{{issue.key}}" } } } ] } }
Can I use similar Json to remove a link - would this work?
{"update": { "issuelinks": [ { "remove": { "type": { "name": "Relates" }, "outwardIssue": { "key": "{{issue.key}}" } } } ] } }
Thanks, sam
Hi @Sam Hepworth -- Welcome to the Atlassian Community!
I did a quick check of the editmeta data and it does not show "remove" as a supported operation for issue links, for the REST API functions available to rules.
So, a noisy work-around (noisy because it causes several issue changes in the history):
Kind regards,
Bill
Thanks, Bill. It is an interesting workaround :) As you mention I will create a lot of changes/noise, and there is a risk of losing links if the automation fails. I hope there is another way to do it, but thanks for the creative suggestion :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the community.
I'm not sure but can you try to replace "remove" with "del"
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.