Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Weekend Automation being sent out too early?

Ken Obsequio September 13, 2024

Hello!

 

I have setup an automation to let customers know that because their ticket was submitted during off hours(weekends), they will have limited support. 

 

The automation is only supposed to go off:

  • Friday - After 6PM
  • Saturday - All Day
  • Sunday - Before 4PM

 

But for some reason, the automation is going being kicked off early morning on Fridays. 

I think it may have to do with request type? or just an error in syntax?

 

I've attached a copy of my automation block for review:

SCR-20240913-myus.png

 

 

Previously I used ".shortTime" to write out the condition. And now Im using the ".longTime"

 

Any feedback will be helpful !

 

Thanks in advance

2 answers

2 votes
Natalya Ozhigova
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2024

Hi @Ken Obsequio 

You can use other type of the condition:

 Capture1.PNG

BR,

Natalya

Ken Obsequio September 18, 2024

Thank you Natalya!

Is there any way to do this for Every Friday?

Robert DaSilva
Community Champion
September 18, 2024

Hey @Ken Obsequio , the condition that @Natalya Ozhigova shared would be in addition to the IF / ELSE block you are already using.

While the attached screenshot below is not properly filled out based on your specific needs, the structure of the blocks should be what you're looking for.

Essentially, you would need to replace your second "Smart Values" condition with the one @Natalya Ozhigova shared.

Screenshot 2024-09-18 at 6.38.23 PM.png

Natalya Ozhigova
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2024

Hi @Ken Obsequio 

Thank you @Robert DaSilva for explanation.

That’s what I meant.
Like Duc Vu likes this
2 votes
Robert DaSilva
Community Champion
September 13, 2024

Hi @Ken Obsequio 

I have a feeling the issue is related to how Jira is comparing the two values. If I were to guess, I can imagine the "Greater Than" condition might be expecting a plain number, and the PM PST component is throwing the comparison logic for a loop.

I would suggest using the .format feature of the time related Smart Values, as found here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-format--- and formatting the time to be one long number.

This is the test I did:

{{created.convertToTimeZone("America/Los_Angeles").format("kkmmss")}}

This will result in the time being formatted as the hour between 01 and 24, the minutes from 00 to 59, and the seconds from 00 to 59. So, for 5:51 PM, this would return 175132. You can then use this as a plain number to compare to 6:00 pm, which would be 180000. If the number is larger, then you know it's past that time.

 

Let me know if this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events