It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Afterhours Ticket Notification

We use Jira Service Desk to run our IT Help Desk for our entire company.  We are only an 8 - 5 shop but we do have users that work evenings and weekends as needed.  During those times the users will report issues and our team is unaware of these issues.  We would like to setup a notification to email to a few IT Members that can assist during the nights and weekends.  I currently have a Project Automation Rule setup like below.  This works for after-hours but doesn't work 100% correctly and doesn't take into account for all day on weekends.  Can anyone give me guidance on how to update to get a better result?

 

(project in (10004)) AND assignee is EMPTY AND createdDate > startOfDay("-7h") AND createdDate > startOfDay("+17h") AND resolution is Empty and issuetype != Sub-task

1 answer

0 votes
Jane Yeoh Atlassian Team Jan 22, 2020

Hi Allan,

Thanks for reaching out.

You can achieve this by using our Advanced Compare condition and some smart values. If you are in Cloud, the now function defaults to UTC, so if you want a different timezone you'll need to change it.

The smart value I am using for this is:

{{#=}}{{now.convertToTimeZone("Australia/Sydney").hour}} > 17 || {{now.convertToTimeZone("Australia/Sydney").hour}} < 8{{/}} && {{now.DayOfWeek}} <> 6 && {{now.DayOfWeek}} <> 7 {{/}}

It is getting the current timezone, converting it to my timezone and then getting the hour. It is making sure that it is after 5pm or before 8am on weekdays. If you're in server, you can just remove the convertToTimeZone functionality and just do now.hour.

To include weekends as well, you would just set the condition to "does not equal" 1 like below:

 

Screen Shot 2020-01-23 at 11.02.17 am.png

 

Hope that helps. Please let me know how you go and if you are experiencing any further issues, feel free to raise a support ticket so we can help you better. 

Cheers,
Jane

Jane,

Thanks for the information.  I have tried to add this to my automation but I get the error below.

Error parsing template: Mismatched start/end tags: null != in template-064127d7-e0bd-44b3-80cd-2c9b135f4f1a:1 

I copied the code you put above exactly so not sure what to do.  How do I raise a support ticket?

Thanks,

Allan Rose

Jane,

Any help or how do I raise a support ticket?

Thanks,

Allan

Hi Allan,

 

Sorry for the delay in my reply! You can raise a ticket here so we can better help you with this: https://support.atlassian.com/contact/#/ 

If you can include a screenshot of your rule configuration and its audit logs as well so we can have a look.

 

Cheers,

Jane

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

How Unito's Newest Features Can Make Your Integrations Better

...ttachments another team sends over from Jira. Much easier for everyone involved. True sync for 100% of Trello native fields Trello is one of the most popular work management tools out there, and more Unito u...

175 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you