Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,784
Community Members
 
Community Events
165
Community Groups

Getting a JQL from another project in automation

I have two projects that works together. project 1 I use as a customer list, there I put all info regarding the customer, name, email, phone, address ans some customer preferences. 

On project 2 I put all information about what I'm doing for them and at the end I send an email containing all what was done. 

I want to use fileds from project 1 and project 2 in the same automation email. that way its easier to keep customer data up to date. 

The problem is that when I run JQL on automation it only find issues on the current project. Is there a way to do that? 

 

3 answers

1 vote
Andy Heinzer Atlassian Team Aug 31, 2020

Hi Rafael,

I see that you're using automation in Jira Cloud, and then using the lookup issues action.  When you create a project rule, then this action is limited to the scope of that project.  Meaning that all JQL searches have to be within that project (project=abc).  Hence when you are trying to use the JQL of

project=Cliente order by created DESC

This will never return any results when validated from a different project because essentially Jira is adding in the other project as a parameter such as

project=ABC AND project=Cliente order by created DESC

Since no issue can be in two projects at once the results will always be 0, unless you create that rule from the Cliente project itself.

This is something though that the global automation rules can help to overcome.  I tested this in my own Jira Cloud and I can confirm that creating a global automation rule with that lookup action does work when triggered/run from an issue in a different project.

You mentioned that you tried the global automation but that didn't work for you. Perhaps if you can share with us some more details about your trigger, conditions, branches, and action for this rule we can better understand the problem here.

Andy

Hi Rafael, you can do it changing your Rule scope on Rule details. 

Screenshot from 2022-06-08 09-26-25.png

And then select Multiple Project ( on Scope) and in Project the list of projects you want to do the search

Screenshot from 2022-06-08 09-26-07.png

0 votes
John M Funk Community Leader Aug 18, 2020

Hi Rafael,

What does your JQL look like? When you run that JQL query in the advanced search does it bring back the issues you expect to see? 

I would also go ahead and make sure all of the fields you want to include in the automation are present in the context for each project using the automation. 

Hi John. 

 

That is the problem, JQL does not bring anything back at all. I'm not filtering anything, it should show all issues from the other project. 

 

In this picture, I'm on project A and trying a JQL on project "CLIENTE"

 

If I open automation for project "CLIENTE" and use same JQL, all issues will pop up. but if I change JQL to Project A, none will show up

 

I also tried on Global rules, all rules and project rules. result is the same. 

jira.jpg

I meant to say earlier. When I search on advanced issue search, yes I can filter to one single issue. then I copy that JQL parameter and past on Automation Lookup issue JQL and there, it does not show anything because its not for the same project. 

Is there a way to lookup issues on a cross project JQL in Automation for Jira? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,900 views 37 49
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you