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)
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.
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
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 :) )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.