Create an alert automation when ticket stuck in a column

Sandra Kabamba November 30, 2021

Hello, I would like to create an automation rule with 2 levels of alert

 

  1. When a ticket stay more than 2 days on specific states (Blocked and code review) without any modification then the assignee is tagged on the comment section with a message 
  2. If tickets stay more than 4 days into a column the list is sent into a slack channel

 

I tried to do it directly on the automation section but it seems that there's no action or trigger regarding time. Should use a JQL query? If yes, how to compose and integrate it into my board.

 

Thanks by advance

1 answer

1 accepted

0 votes
Answer accepted
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.
November 30, 2021

Hi @Sandra Kabamba 

You may do what you ask with a scheduled trigger (perhaps checking daily) and a JQL statement to find the relevant issues.  For example:

project = myProject AND NOT status CHANGED AFTER -2d AND status IN ("Blocked", "Code Review")

 

Kind regards,
Bill

Sandra Kabamba November 30, 2021

Thanks @Bill Sheboy  the query works great! 

But I cannot exclude some labels or include some labels

project = myproject AND NOT status CHANGED AFTER -2d AND status IN ("Blocked", "In Review") AND labels ("iOS","Android","Back")

 

I've got an error message saying 

Error in the JQL query: an operator is anticipated but '(' is mentioned instead. Valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 122)

 

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.
November 30, 2021

Please try instead adding:

AND labels IN ("iOS", "Android", "Back")
Like Sandra Kabamba likes this
Sandra Kabamba December 1, 2021

Yes, it's working. Thanks a  lot @Bill Sheboy 

Like Bill Sheboy likes this
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.
December 1, 2021

I am glad to learn that is working.  Please consider marking this question as answered; that will help others with a similar need in the future find solutions faster.  Thanks!

Like Sandra Kabamba likes this
Joey Huang March 17, 2023

Hi @Bill Sheboy 

I was able to set up a scheduled trigger, using your JQL as a reference. However, the action performed did not return the related results. 

For example, when tickets are in Code Review for > 3 days, it sends an email to me and let me know the results of that query. 

So the query works (returned 3 tickets), sending the email works, but the email has no content in it to let me know which ticket has been sitting in Code Review for > 3 days. 

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.
March 18, 2023

Hi @Joey Huang -- Welcome to the Atlassian Community!

FYI for older posts like this one: it can help to create a new question and link back to the older threads.  Otherwise only the people following this one will see it.  

Back to your question...Would you please post images of your complete rule and the audit log details showing the execution?  Those may provide context for what you are observing.  Thanks!

Kind regards,
Bill

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer