I am trying to create a rule that searches another project and links any issues found in that search
Asked by Allen Culpepper:

I am trying to create a rule that searches another project and links any issues found in that search to the trigger issue.

Also doing similar rules that pulls matching field data from one project and adds it to another projects issues field.

I don't see any rules or info on pulling data from another project to populate the current project.

This rule is ran from a different project than CSONE.

![Screen Shot 2021-01-06 at 6.28.10 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/124412i7D24B8AF50CB490B/image-dimensions/531x364?v=v2 "Screen Shot 2021-01-06 at 6.28.10 PM.png")


Answers:
author: Tom Williams
body: Hi [@Allen Culpepper](/t5/user/viewprofilepage/user-id/3856322)

The "Related Issue Condition" you are using only checks already linked issues on the trigger issue.

What you need to do is run the rule from the trigger issue, perform a JQL to return the set of issues you want to link, and then perform the action on those issues returned in the JQL.

Using a Branch Rule with "type of related issues" set to JQL and adding all projects you wish to include in the "Rule restricted to projects" field should work for you.

Mocked it up for you below.

![Screenshot 2021-01-07 091715.png](https://community.atlassian.com/t5/image/serverpage/image-id/124457iBE3FC846671BACA1/image-size/large?v=v2&px=999 "Screenshot 2021-01-07 091715.png")

Hope this helps.

Tom.

comments: author: Allen Culpepper
body: That worked thank you Tom!

Would I follow the same logic to pull a field value from the CSONE project over into my other project using smart values? I am on server version so not sure if that smart value is available. {{issue.custom_field_name}}


author: Tom Williams
body: Great. [@Allen Culpepper](/t5/user/viewprofilepage/user-id/3856322) I'd appreciate it if you could mark this as an accepted answer.


author: David Leal
body: [@Tom Williams](/t5/user/viewprofilepage/user-id/3514085) I don't understand how this could work, but maybe I am missing something, the question indicates the rule is running from a project different than CSONE and if the rule doesn't have a global scope, you cannot find issues in CSONE from a rule running from another project. Thanks fro any help.


author: JD
body: Hi [@al](/t5/user/viewprofilepage/user-id/3721939) ,

You need to setup the rule as a global automation. You can change the scope of the automation in the rule details to multi-project or global.  
![Screen Shot 2021-01-07 at 4.40.06 pm.png](https://community.atlassian.com/t5/image/serverpage/image-id/124427iC3988B5CA758648D/image-dimensions/455x235?v=v2 "Screen Shot 2021-01-07 at 4.40.06 pm.png")

Please be aware that unlike project rules there are monthly limits on how many times your global/cross project rules you can run. The limits will depend on your Jira plan (Free, Standard or Premium). You can read a bit more about usage and limits here <https://support.atlassian.com/jira-software-cloud/docs/view-your-usage/>

And you can compare the different limits for each Jira plan here  
<https://support.atlassian.com/jira-cloud-administration/docs/explore-jira-cloud-plans/>

Hope that helps!

- John

comments: author: Allen Culpepper
body: It's actually already setup as global, it's just that my team won't leave it that way when I'm editing it so they change it then change back to global so I can run it. It shows the issue trigger as being from the CSONE project for both (same issue key) and never the project it's ran from.


author: Bill Sheboy
body: Hi [@Allen Culpepper](/t5/user/viewprofilepage/user-id/3856322)

Are you saying the people on the team are editing your global rule, changing it back to project-specific?

If so, this could be resolved with permissions. Make the rule global, and ensure you manage who has site-admin permissions. That will limit who can edit the global rules.

If this is not the case, would you please clarify the problem? Thanks!

Best regards,  
Bill


author: Allen Culpepper
body: Hi Bill,

No it's not an issue, its just that we don't have admin rights and they lock us down so I have to ask for permission each time. :)

Thanks.


author: Tom Williams
body: I'd need a bit more info to be sure what I'm suggesting will work for this....
> Would I follow the same logic to pull a field value from the CSONE project over into my other project using smart values? I am on server version so not sure if that smart value is available. {{issue.custom_field_name}}

Sounds like you'd have a many to one ratio so is the value from {{issue.custom_field_name}} common on all the linked issues? If not you'd end up with the value from the latest linked issue in whatever order the rule runs.

I've not found a way to copy field values across without running a linked issue trigger rule. So it will need to be an automated follow-on rule that runs after the manual trigger.

Had a go a mocking it for you...

![Screenshot 2021-01-08 094910.png](https://community.atlassian.com/t5/image/serverpage/image-id/124661i651F2E388B31A077/image-size/large?v=v2&px=999 "Screenshot 2021-01-08 094910.png")

comments: author: Allen Culpepper
body: Yes this is what I need! It only should be one matching. Thanks so much.