{{createdIssue}} smartvalue is not working for Branch Action
Asked by Vikrant Yadav:

Hi Guys,

Need your help in fixing my automation rule.

I have created a rule which is a manually triggered rule.

This rules creates an issue in JSM project.

Rule is working fine creating issue in JSM but not able to set request type.

I have used Branch action and used JQL query issuekey = "{{createdIssue}}" to get issue key of created issue in previous action but it's showing an error "No related issues could be found.". I have used Advanced Smart value as well but it's editing current not the createdIssue. Kindly suggest, how can I update Request Type of the JSM issue created via Automation running in Jira Software project.

![Screenshot 2024-09-17 at 23.07.44.png](/t5/image/serverpage/image-id/347804i7EF588A2ABDF8E9B/image-size/large?v=v2&px=999 "Screenshot 2024-09-17 at 23.07.44.png")![Screenshot 2024-09-17 at 23.07.56.png](/t5/image/serverpage/image-id/347805i4B6DD1AC2E1A98C4/image-size/large?v=v2&px=999 "Screenshot 2024-09-17 at 23.07.56.png")

Thanks


Answers:
author: Bill Sheboy
body: Hi [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711)

What is the scope of your rule: project, multiple-project, or global?

Project-scope rules may create (or clone) issues into other projects, but cannot access them in any other way. That is, it cannot "see" them in branches or update them.

To access issues in another project the rule must be multiple-project or global in scope. And, your Jira Site Admin will need to help make that change in the global rule handling area.

Kind regards,  
Bill

comments: author: Vikrant Yadav
body: Hey [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) I am Jira Admin, I have update the Automation scope to multiple projects Jira Software project and JSM project in which flow is creating an issue.

Using Advance branching able to get issuekey of the created issue but it's not updating the created Issue.

![Screenshot 2024-09-17 at 23.31.49.png](https://community.atlassian.com/t5/image/serverpage/image-id/347820i2F33BC87C01074CC/image-size/large?v=v2&px=999 "Screenshot 2024-09-17 at 23.31.49.png")![Screenshot 2024-09-17 at 23.34.12.png](https://community.atlassian.com/t5/image/serverpage/image-id/347819i20E369C8344349D4/image-size/large?v=v2&px=999 "Screenshot 2024-09-17 at 23.34.12.png")


author: Bill Sheboy
body: Ah...which issue are you trying to update: the newly created one, the trigger issue, or something else?

If trying to update the most recently created issue, branch directly to *Most Recently Created Issue* rather than using a smart value branch.

When you branch on a smart value, it just has data (not an issue) inside of a branch. And so any {{issue}} referenced would be the trigger one.


author: Vikrant Yadav
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) Thanks , after updating the Automation scope, I am able to use Most Recently Created issue Branch, and it's working.

Previously i was using this but Automation is only mapped with Jira Software project not with JSM. Now i mapped with JSM and used "Most Recently Created" branch it works.

Great, Thanks [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)


Tags: automation

cloud

jira-cloud