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

Run an Automation rule in specific hours

Sebastián Buzzurro September 26, 2023

Hello everyone!

My name is Sebastian and I am from Buenos Aires, Argentina.
I created an automation rule that:

  • TRIGGER: Issue Created
  • CONDITION: Issue fields condition = Request Type: Emailed Request
  • ACTION: Send email and Transition Issue to specific status

But this rule should only run every day from 09:00-18:00. Outside of these hours, you should not run.

How can I do this last condition?

Thanks in advance!

2 answers

1 accepted

1 vote
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2023

Hi @Sebastián Buzzurro  For this you can apply if condition >> "Advanced Compare Condition", similar to below screenshot. 

Similar Post :- https://community.atlassian.com/t5/Jira-Service-Management/Automation-for-Out-of-Hours/qaq-p/2333663

Screenshot 2023-09-26 224439.png

Sebastián Buzzurro September 26, 2023

Hi @Vikrant Yadav ! Thank you for your response!
I tried to do this, but when I test it, the automation says "No Actions Performed" and the if block did not match the condition.

Screenshot 2023-09-26 at 15.41.48.png

Now in Buenos Aires, Argentina it is 3:45pm. Maybe the Time Zone is incorrect? Do you know how can I set my Time Zone? (Buenos Aires, Argentina)

Screenshot 2023-09-26 at 15.42.04.png

Like Vikrant Yadav likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2023

Instead of using the shortTime format I recommend the format that gives you the hour as 0-23. 

{{issue.created.convertToTimeZone("America/Argentina/Buenos_Aires").format("H")}}

Then in your If block compare that value as

greater than or equal to 9

less than or equal to 18.

You might also want to use a Log action before your IF block, just to print that smart value into the Audit Log so you can confirm that it is getting the number you expect.

Like # people like this
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2023

@Sebastián Buzzurro As said by @Trudy Claspill Use 24hr format and add Audit Log action to print time, which will helps you in debugging the automation. 

Screenshot 2023-09-27 112644.png

Like Sebastián Buzzurro likes this
Sebastián Buzzurro September 27, 2023

@Vikrant Yadav @Trudy Claspill Thank you so much! It works with this format:

{{issue.created.convertToTimeZone("America/Argentina/Buenos_Aires").format("H")}}

Then in the If block compare that value as

greater than or equal to 9

less than or equal to 18.


:)

Have a good day! 

Like Vikrant Yadav likes this
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2023

Hi @Sebastián Buzzurro We are pleased to hear that we were able to assist you. :)

Like Sebastián Buzzurro likes this
0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2023

@Sebastián Buzzurro -

To supplement what @Vikrant Yadav suggested, I am sure that you need to change your rule triggering event to "Scheduled", then establish needed conditions.  

2023-09-26_13-28-08.png

This is only way where an automation rule can be invoked at a specific time/days in Jira/JSM projects.

Hope this also helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Sebastián Buzzurro September 26, 2023

Hi @Joseph Chung Yin ! Thank you for your response!
I understand you, but I need it to run when a ticket is created during a specific time only :( So the trigger must be Issue Created and then the condition of specific time to run.

Suggest an answer

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

Atlassian Community Events