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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,030
Community Members
 
Community Events
176
Community Groups

Program schedule for turning rules on and off

Hi, I would like to know if you can help me with the following problem:
I have created 3 rules to assign incidents in Jira, these 3 rules are the same in them the only difference is the list of people to which they will be assigned since they work in 3 different shifts in the day, now well the trigger should always be that the rule is executed when creating a new incident but is it possible that these rules are scheduled to turn on and off at different times of the day according to the shifts or only manually?

1 answer

1 accepted

3 votes
Answer accepted
Mikael Sandberg Community Leader Dec 14, 2022

The short answer is no, you cannot turn off and on an automation on a schedule, mainly because automation currently do not have an API. Instead of having three different automation to do this, have you considered using the create timestamp to determine who it should be assigned to?

If you do it based on the hour the request is created you would just have to create if/else conditions that checks the hour and assigned based on the defined list for that hour like this:

Screenshot 2022-12-14 at 1.43.29 PM.png

If you are on standard JSM or higher you also have access to on-call scheduling, and soon you will be able to use that schedule in automation, it is currently slated for Q1 2023 according to Atlassian's public roadmap. Once that is supported it will be a lot easier to maintain round-robin assignments.

I really liked this form and if it works it would be a success.
I added a few conditions to the rule and I want to do it with the current time of Costa Rica, currently the rule is like this but when testing and creating an issue is not assigned, I imagine it is because of the format of the hours.
2022-12-15_14h55_26.png

Mikael Sandberg Community Leader Dec 15, 2022

If you look at the automation I have it logs the time both as UTC and PST. Jira saves all times as UTC, so you have to compensate for that. So for example in your rule when you want to trigger at 2:30 pm - 3:30 pm CST, you have to look for 20:30 - 21:30 UTC. And because you are using half hours too you would need to add that to your If compare.

I would recommend https://www.worldtimebuddy.com/, I used that when I was setting up our automation because we cover four different time zones.

Hey Mikael,

I have been trying to configure the if to use the time and a half and have not figured out how to set it.

I should have a two-shift schedule for various sub groups of people I have tried the following ways but it hasn't worked

2022-12-21_14h31_40.png2022-12-21_13h38_56.png

Mikael Sandberg Community Leader Dec 21, 2022

Because you want to do it on the half hour you would need to use regular expression to catch the full hour. Something like this should work:

Screenshot 2022-12-21 at 2.43.24 PM.png

Mikael Sandberg Community Leader Dec 21, 2022

Note that I am using the {{time}} variable that is {{issue.created.format("h")}}:{{issue.created.format("m")}}, you could use {{issue.created}} but that also includes seconds and the date, so the regex would have to be a bit different.

I have been trying the way you have told me and also other ways and other regular expressions, but it does not recognize the hours at all and does not assign the incidents to the correct people in the shift, I really do not understand what is wrong.

 

Regular expressions tested:
((9):([3-5]\d\s)|(10):([0-2])\d\s)(AM|PM) with {{issue.created.shortTime}}

((9):([3-5]\d\s)|(10):([0-2])\d\s) with {{issue.created.shortTime}}

(9):([3-5][0-9]))|((10):([0-2][0-9])\s with{{issue.created.shortTime}}

 

/(10):[3-5]\d|(11):[0-2]\d/g with {{issue.created.format("H")}}:{{issue.created.format("m")}}

(9):([3-5][0-9])|((10):([0-2][0-9])) with {{issue.created.format("H")}}:{{issue.created.format("m")}}
(9):([3-5][0-9]))|((10):([0-2][0-9])\s(PM) with {{issue.created.format("H")}}:{issue.created.format("m")}

}2022-12-26_16h23_11.png2022-12-26_16h32_41.png

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events