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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Automation for Weekend

Hello, we have a JQL statement for our weekend oncall tickets however some appear to not hit the criteria necessary. Wondering if this statement is correct for reaching all tickets on Saturday & Sunday.

{{#=}}({{now.convertToTimeZone("America/New_York").dayOfWeek}} > 5) && ({{now.convertToTimeZone("America/New_York").dayOfWeek}} < 7){{/}}

Kind Regards

2 answers

0 votes
Sudarshan TS Community Leader Dec 21, 2020

Hello @Kadeem Samuel 
Did you try with a <=5.?

It may sound nothing, but with the information your question has, I think some of the tickets may jump out with the time conversion in the query.
Let me know if there is any change.

Thank you for replying Sudarshan, I will give that change a shot over the weekend to see how it responds.

Hi @Kadeem Samuel ,

Can you share more about what are you trying to achieve? Maybe a share your Automation Trigger and conditions would help to understand your issue and propose a solution.

Hello Italo,

Thank you for the reply; the following is the automation we are trying to correct. Basically, want any support request that comes in all day Saturday and Sunday to get tagged as on-call. We have a second automation that handles the weekday time frame
2020-12-21 16_48_57-Automation rules - JIRA.jpg

Can you try this condition instead? This will check if the current day is either Saturday or Sunday in the NYC timezone. 

First value: {{now.convertToTimeZone("America/New_York").dayOfWeekName}}

Condition: contains regular expression

Regular expression: (Saturday|Sunday)

testautomation.png

I encourage you to also use a log action(see in my image the component under the condition), you can use this to check the {{now.convertToTimeZone("America/New_York").dayOfWeekName}} value in the audit log in execution and it can help you to check the value of your smart value.

Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

254 views 1 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