Employee day off or vacation automation
Asked by Jeferson Carlos dos Santos:

Hi guys, could you help me please?

I have an automation that automatically distributes tickets to employees on a list.  
I wanted to know if there is a possibility of improving this automation so that a ticket is not distributed to an employee who is on a day off or who is on vacation?  
Is there any way to do this through automation?

Thanks!!!


Answers:
author: Fabian Lim
body: Hi [@Jeferson Carlos dos Santos](/t5/user/viewprofilepage/user-id/4968071)

Unfortunately, in the cloud version this is not possible. (DC has this though: <https://confluence.atlassian.com/automation070/smart-assign-jira-issues-load-balancing-round-robin-and-more-1014664568.html>)

For one of our clients we used this plugin which works great to manage rotations and when people are off: [https://marketplace.atlassian.com/apps/1225712/smart-assignments-and-rotations-for-jira?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/1225712/smart-assignments-and-rotations-for-jira?hosting=cloud&tab=overview)

Regards,

Fabian


author: Mikael Sandberg
body: You can't do it directly in the automation unless you go in and remove the user that is out-of-office. As I wrote in [this article](https://community.atlassian.com/t5/Jira-Service-Management-articles/Assign-requests-to-agents-based-on-the-hour-of-the-day-on-call/ba-p/2553353) it can be done if you either use the on-call schedule in Opsgenie, or use an app in the [Marketplace](https://marketplace.atlassian.com/) that allows you to set OOO for users.

comments: author: Jeferson Carlos dos Santos
body: Hi [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579)

Can I use this solution that you provide in your article about the issue of hours for another condition that I need to apply?  
Which is about the employees' schedules, 3 of them start at 9am and stop at 6pm and the other 3 start at 8am and stop at 5pm. Tickets that are opened outside these 6 employees' hours will not be assigned to anyone.


author: Mikael Sandberg
body: Yes, and you have a couple of options to do it. Either make an If component for each hour that your users are online, or you can have just three, one for the 8am time slot, one for 9am-5pm and the last one for the 6pm slot.


author: Jeferson Carlos dos Santos
body: Could you help me create the expression for this condition that I need for both groups? I'm new and I still have difficulties with these expression creation parts within Jira.

![img1.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/299756iA95340D2B3EFA7F9/image-size/large?v=v2&px=999 "img1.JPG")


author: Mikael Sandberg
body: So it would look something like this if you do it for the 9am - 5pm slot:

(17\|18\|19\|20\|21\|22\|23\|00\|1)

Note that Jira stores the time in UTC, so you would have to convert the formula to that for it to work. The above formula is based on PST.


author: Jeferson Carlos dos Santos
body: [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579)

I was looking at some topics while I was trying to do the test you gave me and someone appeared commenting that they made the following condition below in which it could work, can you tell me if this could be correct too?

![img.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/299762i0B1FCD1EFAC18703/image-size/large?v=v2&px=999 "img.JPG")


author: Mikael Sandberg
body: Yes, that should work too.


Tags: cloud

jira-service-management

jira-service-management-cloud