Related Issues Condition way of work with condition - "Are not present"

rui_miguel November 26, 2022

Based on the return of a JQL, if the query does not returns issues I want to transition an issue ...

But it seems that the if statement is always true independently if the JQL returns or not issues.

What am I doing wrong?

When I run the query in the issue serach it returns the correct data (sometimes returns issues and in other it does not return as expected, using different id in the search)

image.png

1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2022

Hi @rui_miguel and welcome to the community,

Although I can't test your JQL, I'll try to make a shot in the dark and ask: What happens if you remove the "for current issue"?

In addition try, as a test, on your JQL to remove the smart values and replace them with normal values (issue keys etc), validate the query and see how your rule behaves.

Adding logs will also help to identify the cause of your JQL passing all the time.

rui_miguel November 28, 2022

Hi @Alex Koxaras _Relational_ , if I remove "For Current issue" and use the issue key it keeps on doing the same ..

Here is the automation done

Untitled.png

I understood what is going on ... As I'm doing this automation in a specific project the "IF: JQL issues not present" when performing the validation instead of using the query:

(issuetype = Test and ( issue in testExecutionTests(WPAB2C-1447,BLOCKED) or issue in testExecutionTests(WPAB2C-1447,Pending_3rd) or issue in testExecutionTests(WPAB2C-1447,ToDo)))

it adds 

(project in (10835)) AND and issuetype = Test and ( issue in testExecutionTests(WPAB2C-1447,BLOCKED) or issue in testExecutionTests(WPAB2C-1447,Pending_3rd) or issue in testExecutionTests(WPAB2C-1447,ToDo)))

which makes returning 0 rows.

 

I've passed the rule to global rules and it is working. Thanks for the help (changing the smart values gave the light needed :) )

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events