When I change a specific status, the custom field updates according to the criteria
Asked by kalaimani:

Hi Team

My Jira Cloud instance's default time zone is US-based, while my working hours follow India Standard Time (IST). We haven't changed the instance's time settings.

* When I move a status from 'In Progress' to 'Done,' there are criteria based on our IST timings.
* If the issue is moved from 'In Progress' to 'Done' before 12 PM, and the language selected is English, the automation should set the Domain ETA Date to the same day.\[It should come IST timings\]

<!-- -->

* If the issue is moved from 'In Progress' to 'Done' After 12 PM, and the language selected is Non- English, the automation should set the Domain ETA Date to the two days after.\[It should come IST timings\]
* ![Screenshot 2024-08-03 at 5.12.10?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/339833iFEF566B307E95A0A/image-size/large?v=v2&px=999 "Screenshot 2024-08-03 at 5.12.10?PM.png")


Answers:
author: Bill Sheboy
body: Hi [@kalaimani](/t5/user/viewprofilepage/user-id/5363035)

I am unclear if you are asking a question about creating / updating an automation rule or are making statements about what you have already implemented.

If you are asking about implementing a rule, please review the date / time functions, particularly for time zone management, to help: <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/>

And if that does not help...please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Kind regards,  
Bill

comments: author: kalaimani
body: Hi Bill

My Jira instance is currently set to the US time zone, while I work in the India time zone. We usually receive issues based on the US time zone, but my requirement is to consider my time zone when I start work. If an issue is received before 12 PM IST, with the custom field selected English, then the Done ETA Date should be automatically set according to my requirements.

Smart Value : {{now.toDateTimeAtStartOfDay("Asia/Kolkata").plusHours(12).jiraDateTime}}  

EstMid day : {{now.toDateTimeAtStartOfDay("US/Eastern").plusHours(12).jiraDateTime}}  

![Screenshot 2024-08-03 at 10.12.45?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/339843i588FD07630DD9E15/image-size/large?v=v2&px=999 "Screenshot 2024-08-03 at 10.12.45?PM.png")![Screenshot 2024-08-03 at 10.13.28?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/339844i62681226272C904B/image-size/large?v=v2&px=999 "Screenshot 2024-08-03 at 10.13.28?PM.png")![Screenshot 2024-08-03 at 10.13.46?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/339845i7AB3010C5C2D8123/image-size/large?v=v2&px=999 "Screenshot 2024-08-03 at 10.13.46?PM.png")![Screenshot 2024-08-03 at 10.13.58?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/339846i2F1804D3C0F15420/image-size/large?v=v2&px=999 "Screenshot 2024-08-03 at 10.13.58?PM.png")


author: Bill Sheboy
body: Date / time comparisons in rules can be challenging, particularly when time zones are involved. I recommend writing the values to the audit log before the comparisons to ensure they are what you expect to help with rule testing.

It appears you are comparing values in two different formats: jiraDate and jiraDateTime. Please try using one format to ensure proper comparisons.

Also, I recommend using {{now}} with convertToTimeZone() *before* trying to change the time values.


Tags: automation

cloud

jira-cloud

smart-value