Forums

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

Can you get / set / view times in due dates with automation?

Joe Graham
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 2, 2024

Trying to create daily tasks, and set the due date to the end of day today.  

 

{{now.withHour(23).withMinute(59)}} is creating a task that is showing immediately overdue.  Checking the XML export of the issue, it is showing no time, just the date.  Using {{now}} also shows no time.  All other attempts to set via REST API, etc. just show the date.  Is this a limitation of the free tier?  None of the documentation indicates this.  

1 answer

0 votes
Karan Sachdev
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 5, 2024

Hey Joe,

 

If you're using the "Due Date" system field, please note that its a date picker field, so it won't display the time.

You will need to create a custom field of "Date time picker" type.

 

2024-09-06_10-54-44.png

 

Additionally, your smart value is correct. I tried this one and it worked:

{{now.withHour(23).withMinute(59).withSecond(0)}}

 

However, this will add the date time as per the default timezone (UTC). If you want to convert it to your timezone, you'll need to use the below format:

{{now.convertToTimeZone(“Asia/Kolkata”).withHour(23).withMinute(59).withSecond(0)}}

 

You can find more details on the syntax and the available timezones here:

Automation smart values - date and time

 

I hope this helps.

 

Cheers,

Karan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events