Getting a JQL from another project in automation

Rafael Ibanhez August 18, 2020

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? 

 

4 answers

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 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

0 votes
Antony Delgado December 5, 2023

Hi!


Could anyone solve this? I have the same situation and I cannot obtain the data of the second project with which I want to interact

Is it really possible from a global automation to perform actions in project A depending on the result of a JQL that searches for information in project B?

0 votes
Mauricio Cordeiro June 8, 2022

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 Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 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. 

Rafael Ibanhez August 19, 2020

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

Rafael Ibanhez August 25, 2020

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
AUG Leaders

Atlassian Community Events