Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Web Request in Advanced Branching results in 404

Anthony Nguyen
Contributor
June 20, 2024

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.

2 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 21, 2024

Hi @Anthony Nguyen 

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

Anthony Nguyen
Contributor
June 23, 2024

I already ended up swapping to that premade action, but yeah, my mistake was not using quotations. Thanks!

Like Bill Sheboy likes this
0 votes
Kuldeep singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2024

Screenshot_20240621_083254.jpg

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events