I want to link a main issue with other issues based on their keys that users mention in a text field on the main issue.
1. I run a match on the field. According to the documentation, this results in an iterable collection.
2. I set up advanced branching on the collection which has been split based on comma delimiters as seen in this comment.
3. In the branch, I send out a web request to create an issue link according to Jira Cloud REST API v3 with the following payload:
{ "inwardIssue": { "key": {{issue.key}} }, "outwardIssue": { "key": {{collectionKey}} }, "type": { "name": "Relates to" } }
The web request will work for the very first collection key. The subsequent requests fail and trigger a 404 error: "issue does not exist or you do not have permission to see it."
I've placed logging throughout the process, and all output appears to be correct so far. If I test with the same issues but each individually, there is no problem.
I thought it may be an issue of concurrency (?) so I've tried the delay setting, but that did not affect the failed outcome.
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
First thing, the key value for issue linking in your JSON expression needs to be within quotation marks, as described in the REST API documentation you linked to.
Next, are you trying to repeatedly add links to the same issue, or something else? If so, have you considered using a single update expression (rather than Advanced Branching) and using advanced edit to do so: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Linking-issues
Kind regards,
Bill
I already ended up swapping to that premade action, but yeah, my mistake was not using quotations. Thanks!
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.
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.