Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL query for automation in Jira

George Davitaya May 23, 2024

Hi, their! 

I am newbie in Automatisation Jira 

I have a issue, I need to create a request for a JQL query for automation in Jira
If there are tasks for approval, then send a message in Slack with a summary of tasks, if there are no tasks for approval, send a message “no tasks” 

 

but when using the if function, I receive a message for each task, I think that the issue is in the request itself, how can I make the request correctly?

1.png2.png

3.png

3 answers

1 vote
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2024

Hi @George Davitaya

Welcome to the community!

You need to ensure that the if and else statements are all within the same branch.  In your automation, after the first if statement runs, then it will run the second and then the second one runs. 

I hope this he.ps. 

0 votes
George Davitaya May 24, 2024

Hi! @Rudy Holtkamp @Fabian Lim 

Do you mean it should be done this way? Sorry, I still don’t understand well what you mean, can you give more information, because this way don't work(

 

Thanks in advance for your support 

 

4.png5.png

0 votes
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2024

Hi @George Davitaya and welcome to the community,

In your trigger you are probably already looking for issues. And since you have three times the same output I assume that the trigger has three hits.

You should remove the JQL query in your trigger and place the lookup issue action as the next action with the JQL you removed from the trigger. After that you branch on smart value with {{lookupIssues}} as first value and lookupIssue as var.

Then you can use an if else condition with a smart value condition: {{lookupIssue.status.name}} equals Waiting for approval followed by the slack message. After that the else with another slack message (for all the issues that don't need an approval).

I hope this helps.

Rudy

George Davitaya May 24, 2024

Hi! @Rudy Holtkamp 

Do you mean it should be done this way? Sorry, I still don’t understand well what you mean, can you give more information, thanks in advance for your support 4.png5.png

Suggest an answer

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

Atlassian Community Events