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?
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.