Automation Linked Issues: You must provide one of 'inwardIssue' or 'outwardIssue'. (issuelinks)
Asked by Kristine Daniels:

I am trying to set up automation that links new issues to an existing issue. This seems like it should be straightforward, but I get this error:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348460i4D607940696260D0/image-size/large?v=v2&px=999 "image.png")

Rule set up:  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348462i7A09553153F4422D/image-size/large?v=v2&px=999 "image.png")

Things I have tried based on various support articles:

* ensured the rule actor has permissions to browse the project and link issues
* ensured the linked issue field is present/visible on the edit screens of both issue types being linked

I've also tried using examples for Additional Fields:

    {   "update":{      "issuelinks":[         {            "add":{               "type":{                  "name":"Relates",               },               "outwardIssue":{                  "key":"SOC2-662"               }            }         }      ]   }}

Appreciate any guidance!!


Answers:
author: Bill Sheboy
body: Hi [@Kristine Daniels](/t5/user/viewprofilepage/user-id/5584281)

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...

Some actions in rules need an issue to be present at a specific location in the rule, and I suspect there is no issue at the point your rule tries to add the link...

Or instead the issue to which you are trying to link is in another project and the rule scope is incorrect.

Seeing the specifics of your rule and knowing its scope (i.e., single project, multiple project, or global) will confirm this.

Kind regards,  
Bill

comments: author: Kristine Daniels
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) , thanks for the fast response. Rule is currently stripped down to the part I can't get to work. Single project scope, all issues contained. I've set myself (admin) as Actor, but same result as when I use Automation for Jira.![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348476i76B91542E3ED9859/image-size/large?v=v2&px=999 "image.png")


author: Kristine Daniels
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) , this is the full audit log snipped

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348477iA2A4E44B20CEE267/image-size/large?v=v2&px=999 "image.png")


author: Bill Sheboy
body: Thanks for that information.

Rather than using the Edit Issue action, please use the *Link Issues action* to do so. Then re-test and post updated images of your rule and the audit log details.

Also I note you have changed the rule actor from *Automation for Jira* to your own user. Why make that change? Sometimes that change may cause permissions errors if the user cannot perform the actions taken by the rule.


author: Kristine Daniels
body: Slightly different/shorter error. Set back to Automation for Jira for actor. I tried both single project scope and global.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348478iED83951A562FDF89/image-size/large?v=v2&px=999 "image.png")

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348479iC8601BAFE797104B/image-size/large?v=v2&px=999 "image.png")

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348480i8465D8EF8C9DC618/image-size/large?v=v2&px=999 "image.png")


author: Bill Sheboy
body: That is curious...

This rule appears to be global scope, and the trigger issue is in the project **S0C2** (note that is a zero in the key) and you are trying to link to an issue in **SOC2** (note that is an O in the name). *And so these issues are not in the same project.* Is that correct as you mentioned earlier the issues were in the same project?

What user activity / edit are you performing on the issue when the rule triggers?


author: Kristine Daniels
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) , I don't think I would have EVER figured out that I had made the project code with a 0 instead of an O! Thank you, thank you, thank you!! I seriously thought I was losing my mind.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348491i2F90A1D61B2D8FAD/image-size/large?v=v2&px=999 "image.png")


Tags: cloud

issue-link

jira-automation

jira-cloud