Error linking issues : Issue does not exist or you do not have permission to see it.
Asked by Fatima AALLA:

Trying this automation to link a created issue to an other it's key is in a custom field 'tested issue filled when creating issue but it doesn't work :Error linking issues : Issue does not exist or you do not have permission to see it.![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/285881i13AEDC8538F7BAB3/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Tim C
body: Hi [@Fatima AALLA](/t5/user/viewprofilepage/user-id/5261577)

A couple of things you could try ...

1) use the "refetch issue data" action to make sure that customfield value is available to the rule (as it's being run on creation - sometimes runs quicker than data changes are made).

2) try using {{issue.Tested Issue.value}}

3) try using the customfield ID instead of name ...

```
{{issue.customfield_xxxxx}}
```

4) try using the "log action" action to record the customfield value into the audit log for the automation rule - then it's easier to check what your rule is getting from the customfield and check it's a "key" value as needed for linking issues (e.g. ABC-123 format).

5) the "actor" (rules details) used to perform/run the automation rules needs to have the permission to "link issues" in your project.

I hope one of the above may help you find a solution?

comments: author: Fatima AALLA
body: Hello [@Tim C](/t5/user/viewprofilepage/user-id/4438063) , thanks for replying, the rule is able to get the tested issue key![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/285895i097865D6F81843CC/image-size/large?v=v2&px=999 "image.png")

you can see the key here, but the problem is in linking


author: Tim C
body: Hi [@Fatima AALLA](/t5/user/viewprofilepage/user-id/5261577)

Is your automation rule running under the same DSI project?

If it's linking across into a different project - then that project also needs to be added into the scope of the automation rule.


author: Fatima AALLA
body: Hi [@Tim C](/t5/user/viewprofilepage/user-id/4438063) , yes it's in the same project


author: Tim C
body: Hi [@Fatima AALLA](/t5/user/viewprofilepage/user-id/5261577)

Is the "linked issue" field available on the edit screen used for these issue types???


author: Fatima AALLA
body: Hi [@Tim C](/t5/user/viewprofilepage/user-id/4438063)

YES ALREADY


author: Tim C
body: Hi [@Fatima AALLA](/t5/user/viewprofilepage/user-id/5261577)

This route works for me .... created a variable {{mykey}} holding your customfield ...

![Screenshot 2023-10-12 121849.png](https://community.atlassian.com/t5/image/serverpage/image-id/285905i6D5EB0F133823A44/image-size/large?v=v2&px=999 "Screenshot 2023-10-12 121849.png")

Then use this variable for the linked issue key ...

![Screenshot 2023-10-12 121905.png](https://community.atlassian.com/t5/image/serverpage/image-id/285906iEDBC2693A6165C11/image-size/large?v=v2&px=999 "Screenshot 2023-10-12 121905.png")

Which probably points your problem towards the timing of the rule around the creation of the issue and/or the user which is being used for running the rule (actor).

Perhaps, as a test, try changing the rule to trigger on editing of the customfield value rather than on creation and see if the automation works?


author: Fatima AALLA
body: That works for me too !! thanks [@Tim C](/t5/user/viewprofilepage/user-id/4438063) you saved my day!


author: Tim C
body: [@Fatima AALLA](/t5/user/viewprofilepage/user-id/5261577) - no problem - glad we got there (eventually).