Hello,
We have started a second shift and are need to split the ticket assignment by issue created timestamp. The past solutions have been locked behind the Archived files. https://community.atlassian.com/t5/Automation-questions/qa-p/automation-questions.
I'm need to determine a method how to have a 1st (6AM-5PM CST/CDT) and 2nd (5PM-2AM CST/CDT).
I already have an automation to assign ticket based on different buildings. So, I would like to update the if statement for when an issue is created.
Hi @Trevor Long
I think you need to extract just the hour in 24h format after conversion and compare it
{{now.convertToTimeZone("America/Chicago").format("HH")}}
That will return values like 06
, 14
, 23
, etc.
You can then add conditional checks such as:
If >= 06
and < 17
→ assign to 1st shift
If >= 17
and < 02
(next day) → assign to 2nd shift
But in this case you need to handle timespan like 17:00 - 02:00. So more else ifs will be needed.
By the way, I’m one of the folks behind the free app SnapAssign. 🙂
It’s built specifically to handle things like round-robin and shift-based assignments in Jira, without needing to maintain long chains of conditional rules. SnapAssign could make your shift split logic easier to configure and maintain. Please let me know if you have questions on that regard.
Hi @Trevor Long
Welcome to Atlassian community and thank you for your question.
Inside automation you can user smart value to get the day hours like this:
{{issue.created.format("HH")}} setting in a variable and comparing with an if.
For reference, smart value date functions: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
Cobditiona logics: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
Math expression: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Matteo Vecchiato
I attempted to have the timezone sync for CST, then assign tickets to our 2nd shift team. The rule failed. This is the smart value I tried:
{{now.convertToTimeZone("America/Chicago").shortTime}}
Maybe for a better understanding here is a snip of the if statement I have for auto assignment based on the custom option for building (since we deal with multiple sites).
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.