Forums

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

problem with automation rule in jira

Виктория
Contributor
May 21, 2020

I create rule. when priority of a sub-task created or updated change reaction time.{{now.plusHours(8).jiraDateTime}}
but when I change priority in the issue it shows me Screen Shot 2020-05-21 at 11.20.49.png

How is it possible?

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2020

Hello @Виктория

Thank you for reaching out.

Per your description, it seems you are looking for a way to add 8 hours ahead from the current time to a custom field when the priority is changed. Is that correct?

If that's what you are trying to achieve, I believe the following rule should work for you:

Screen Shot 2020-05-22 at 20.39.52.png

Let us know if you are trying to achieve a different goal.

Виктория
Contributor
May 25, 2020

Hello @Petter Gonçalves 
you wrote the same code like I made but still it went me wrong answer "4 hours ago"

Look at the screen, please.

And may be it`s possible to make 8 hours only in working time business day

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 25, 2020

Hello @Виктория

Can you please send a print of your rule?

Also, you mentioned that you added the parameter {{now.plusHours(8).jiraDateTime}} instead of {{now.plusHours(8)}} as I did. Can you please change the parameter and check if it worked?

Additionally, I tested the rule out of business hours and it has properly worked.

Виктория
Contributor
May 26, 2020

@Petter Gonçalves 

its working also like your {{now.plusHours(8)}}. 
jiraDateTime - just type of field

Screen Shot 2020-05-26 at 15.25.30.pngin the end same -same problem

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2020

Hello @Виктория

Thank you for your details.

This a very weird problem, since it is working perfectly on my test site. Please, check the following details:

  1. Check if there are other automation rules that might be causing the time to be incremented/decremented after the issue is updated
  2. Use the {{setTimeZone}} function to make sure you are adding the time and date in the current timezone you are, as described in the documentation below:
    Smart values - date and time functions 
  3. Can you confirm if the rule works if you add an explicit date & time value instead of using the {{now.plusHours}} function?

Let us know the results you got from the steps above.

Suggest an answer

Log in or Sign up to answer