Forums

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

How can I use automation to copy a date from a date/time custom field into the system Due Date field

Marc Thomson
Contributor
August 18, 2023

One of our work management projects has a custom field "Change Date/Time" that, when changed, should trigger an automation to change the Due Date field.

The automation I have set up to do this copies the "Change Date/Time" field value to the Due Date field, but always seems to increment it by a day.

I tried changing this to set the Due Date by referencing the custom field directly, like this:

{{issue.getCustomFieldValue(customfield_"Change Date/Time")}}

The automation runs without error, but the Due Date gets set to null, rather than the date from "Change Date/Time".

How do I set Due Date to the correct date?

1 answer

1 accepted

5 votes
Answer accepted
Bill Sheboy
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.
August 18, 2023

Hi @Marc Thomson 

The due date field is a date type and your custom field is a date/time field, so instead try setting the field with this, using the jiraDate formatting to drop the time:

{{issue."Change Date/Time".jiraDate}}

And also, smart values are name, spacing, and case-sensitive.  Let's confirm you have the correct smart value for your field using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Essentially you identify and issue with your field, call the REST API using a browser, search for your field on the page, and you will find your smart value and the custom field id, if you want to use that instead.  Most importantly, if you do not find your field in the results, it is not supported by automation rules.  (This can be the case for some built-in and marketplace app fields.)

If neither of those things help, please post images of your complete rule, showing your issue edit action details, and of the audit log details showing the rule execution.  Those will provide context for the community to offer suggestions.

Kind regards,
Bill

Marc Thomson
Contributor
August 21, 2023

This is exactly what I was looking for, Bill! Thank you! It worked like a charm!

Like Bill Sheboy likes this
Bill Sheboy
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.
August 21, 2023

Awesome; I am glad to learn that helped!

Suggest an answer

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

Atlassian Community Events