Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL in Automation returns zero results while Advanced search JQL returns 2 results

Inna S
Contributor
February 20, 2023

Hi, 

I'm trying to read a field value from an issue in a project.

I know the project name, but the issue has to be looked up by one of its fields.

Using Automation 'Lookup Issues' action I type the same JQL used in the advanced search:

project = myproject.

Advanced search returns 2 issues, the Lookup inside Automation returns zero.

I've tried double quotes, project name, project key, project id. Nothing works.

Any idea how to get there?

Thank you.

2 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2023

Hi @Inna S 

For a question like this, please post images of your rule and the audit log details showing the execution.  That will provide context for the community to offer suggestions.

Without that information, I wonder...

Your JQL references a Jira project.  Is your rule defined in a different project?  If so, the rule cannot "see" the issues as they are out of scope.

Or if your rule is defined as multi-project, is the project referenced in the JQL defined in the rule details/configuration?

Kind regards,
Bill

Inna S
Contributor
February 20, 2023

Hi @Bill Sheboy 

The rule is defined as a multi-project, listing both, the project where the automation will run and the other project where the issue of interest resides.

 

But the query generated has the "original" project, and the one I'm interested in.

(project in (10007)) AND ((project = MYPROJ))

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2023

Please try changing that to include both projects using IN:

project IN (10007, MYPROJ)

Otherwise no issues will match as they cannot be in both projects at one time.

Inna S
Contributor
February 22, 2023

I do not get to define this query, I can only observe it after the validation is executed and presents the link to results.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2023

I am not following how that can be the case...Would you please post images of

  • your complete rule, including the details where the query occurs, and 
  • the audit log details showing the execution?

Thanks!

0 votes
Craig Nodwell
Community Champion
February 20, 2023

Hi @Inna S do you have an OR statement in your Advanced search?

Inna S
Contributor
February 20, 2023

Hi @Craig Nodwell 

No, reduced to the single (project = myproj).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events