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

How to create a loop using JIRA automation

Reb Bravo March 9, 2024

Hi,

We are currently making a 3-strike rule automation using JIRA we have successfully created the first 3-strike notification. The rule condition is that if the ticket has been assigned to the Waiting for customer status, it will add a comment on the ticket and add a label corresponding to the strike. 

  • 1st strike - 7 days
  • 2nd strike - 14 days
  • 3rds strike - 21 days
  • Ticket Closure - 22 days (add 24 hrs from the last notification)

1st loop.png

Once the customer replies then a label will be added to the ticket "reset_3strike" which will trigger the loop we created.

We added a loop by creating another automation with different comment. (Please take note that we ticked the "Prevent duplicates by only adding this comment once to a particular issue.")

2nd loop.png

We would like to know if there is a way we could loop the notification for the 3 strike rule without creating an additional automation. For example if the automation reads the "reset_3strike" label it will run the 3-strike automation again and will comment the same notification again although there is already a similar comment on the ticket. 

We have tried to un-tick the Prevent duplicates and it flooded the ticket with multiple comments. 

1 answer

1 accepted

0 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2024

Hi @Reb Bravo,

This is a creative approach, but you might be over-engineering it slightly.

When a ticket is in status waiting for customer and the customer replies, rather than adding a label, I would remove any strike labels entirely and change the issue status, since it is no longer waiting for customer.

When a ticket enters the waiting for customer status (for the first time or again), it will always get there with the same state: without any strike labels.

You can use a scheduled trigger and JQL fiilters to run this automation e.g. once a day. Having separate rules for the different scenarios does not need to be a problem, as they will only count to your automation rule execution limit if they perform any actions.

As an example:

status = "waiting for customer" and status changed to "waiting for customer"
before -7d and labels not in 'strike1'

this would retrieve all the issues you need to add the first comment to and add the label for. Using a filter will also process all issues in one go. You can use variants for the other scenarios in the list.

Hope this helps!

 

Reb Bravo March 13, 2024

Hi @Walter Buggenhout

Works like a charm! This is perfect for our automation. Thank you so much! 

Cheers,

Reb

Reb Bravo March 20, 2024

Hi @Walter Buggenhout

Good day! Additional question for the automation. Since we are running the 3 strike rule, we're currently sending proactive follow-up messages to our clients at 7-day intervals.

However, we've encountered an issue where these messages are still being sent out on weekends.

Is there a way for us to exclude weekends from the counting process? For instance, if the 7th-day falls on a Saturday, we'd like to skip that day and send the follow-up message on the next business day, which would be Monday. Is this possible?

For your reference, here are the JQL queries we are using.

  • 1st Strike : 
    project = "ESD" AND status = "Waiting for customer" AND (labels is EMPTY OR NOT (labels = "1st_strike" OR labels = "hold_3strike")) AND "Customer Request Type" != "UAT Feedback (ESD)" AND (assignee in membersOf(product-support) OR assignee in (712020:459e9b3a-2572-41f9-a936-0de543d66153, 712020:0ed0ea96-04b3-4fcf-950f-3751ad639a37, 712020:624e71285f63fd0069b70286)) AND not status changed after -7d
  • 2nd Strike : 
    project = "ESD" AND status = "Waiting for customer" AND (labels is EMPTY OR NOT (labels = "2nd_strike" OR labels = "hold_3strike")) AND "Customer Request Type" != "UAT Feedback (ESD)" AND (assignee in membersOf(product-support) OR assignee in (712020:459e9b3a-2572-41f9-a936-0de543d66153, 712020:0ed0ea96-04b3-4fcf-950f-3751ad639a37, 712020:624e71285f63fd0069b70286)) AND not status changed after -14d
  • 3rd Strike :project = "ESD" AND status = "Waiting for customer" AND (labels is EMPTY OR NOT (labels = "3rd_strike" OR labels = "hold_3strike")) AND "Customer Request Type" != "UAT Feedback (ESD)" AND (assignee in membersOf(product-support) OR assignee in (712020:459e9b3a-2572-41f9-a936-0de543d66153, 712020:0ed0ea96-04b3-4fcf-950f-3751ad639a37, 712020:624e71285f63fd0069b70286)) AND not status changed after -20d

Thank you in advance for your help!

Cheers,

Reb

Reb Bravo March 25, 2024

Hi @Walter Buggenhout

Good day! Just to follow up on my last comment is there a possible way we can exclude the weekends on the day counting?

Your answer will be greatly appreciated.

Thank you!

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2024

Hi @Reb Bravo,

Well ... not the way you are currently approaching it. JQL just counts days, it does not have a feature to count business days.

If you would change your approach again and set up SLA's for this, you could use the SLA calendar to define working days and the SLA status and timer to steer your entire setup. It's possible, but it would be like starting all over again.

In addition: it seems that your cadence is based on weeks. 7 / 14 /21 days is 1 /2 / 3 weeks, so it's safe to assume that there will always be weekends in your current configuration. If you just add the weekend days to your math, you should automatically cover for them as non working days. So just increasing the counters to 9 / 18 / 27 days should come very close to the desired scenario, I guess.

Suggest an answer

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

Atlassian Community Events