How can I create an autom rule to add a comment when a specific status has not been updated?

Natalia Mojica
Contributor
October 16, 2023

Hi here!

Im trying to create an automation rule to add a comment when a specific status (client review) has not been updated after 72 hours. 

This is what I have at the moment, but I'm sure it's the trigger where I'm having the error, but I don't know which one is the most appropriate for my situation.

Captura de pantalla 2023-10-16 a la(s) 9.21.13 a. m..png

I used the Issue transitioned trigger, however, when using this it does not respect the rule that the status has not been changed after 72 hours. It only adds the comment immediately it changes from one status to another.

Captura de pantalla 2023-10-16 a la(s) 9.21.59 a. m..png

Finally, I want to know how to configure the Then, so that in the comment the rule tags the person who created the ticket. Right now I have it as @{{reporter.displayName}}, but I want the person to be tagged.

 

THANKS!

2 answers

2 accepted

2 votes
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2023

Hi @Natalia Mojica , 

A trigger tells the rule when to activate, so your rule will only trigger on an update, not at a specified time. 

If you would like to implement this, you would need a scheduled rule that checks (for example) every hour is there are issues that fit your condition. 

Use a JQL query to find the issues (be sure to be very precise here), you could use something like: 

status = Backlog and updated < -72h

If the project you are working in is a service project, think about implementing it as an SLA and simply use the breach as a trigger. 

 

To mention the reporter in a comment, use this syntax:

[~accountid:{{issue.reporter.accountId}}]

Hope this helps! 

- Tessa

Natalia Mojica
Contributor
October 16, 2023

Hey Tessa, thanks. I have a question: 

If I schedule it every day, will this message be repeated daily on tickets that are not updated? If yes, how can I avoid this? Because what I want is to send an alert message only once, but not for it to become daily if there are no changes. 

Also, would the query be like this: issuetype = Story AND status = "Client Review" AND NOT status changed after -72h

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 18, 2023

Hi Natalia, 

Answering both questions at once: If you would use your query, then yes, it will place a comment every day after the 72 hours have passed, as long as the issue gets no update. 

You can change this behaviour though, by narrowing the query, to something like this: 

 issuetype = Story AND status = "Client Review" AND updated > -3d AND updated < -2d

-> updated < -2d => the last update is more than 2 days ago
-> updated > -3d => the last status change was in the last 3 days.

This should exclude all issues from your filter that are transitioned earlier so no repeats. 


This way you check all updatesas well, not only transitions.

You could use the "Add comment only once to each issue" too, but then If you have "repeat offenders" in the same issue, it will not work again. 

Hope this helps!
- Tessa

0 votes
Answer accepted
Marc - Devoteam
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.
October 16, 2023

Hi @Natalia Mojica 

Use the scheduled trigger.

This trigger runs on your schedule set and then checks.

Execute your JQL in the scheduled trigger and add a comment if JQL applies

Example rule:

Screenshot 2023-10-16 at 17.09.24.png

Natalia Mojica
Contributor
October 16, 2023

Thank you for your answer. I have a question: 

If I schedule it every day, will this message be repeated daily on tickets that are not updated? If yes, how can I avoid this?

Because what I want is to send an alert message only once, but not for it to become daily if there are no changes

Marc - Devoteam
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.
October 18, 2023

Hi @Natalia Mojica 

No as there is an option on the add comment action you can enable

Option: Prevent duplicates by only adding this comment once to a particular issue.

Suggest an answer

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

Atlassian Community Events