TL:DR - Attempting to format Asset Object DateTime fields via Automation outputs an empty value.
I am using global automation to create issues based on objects in Assets, and one of the fields I'm trying to populate when creating the issue is a DateTime field. Specifically, I'm trying to capture a "Contract End Date" Asset DateTime field in an object and add it to a custom DateTime issue field called "Scheduled Date/Time".
Originally, in the create issue action, I was using this smartvalue:
{{system."Active Contract"."Contract End Date"}}
In this example:
When I ran this, I got the following error in the automation audit log:
Check the format of Scheduled Date/Time (customfield_10087)
So I figure I'd add a format to the smartvalue that I'm using to populate it. Based on the documentation here (Jira smart values - date and time | Cloud automation Cloud | Atlassian Support) I appended a ".jiraDateTime" to the end of my smartvalue:
{{system."Active Contract"."Contract End Date".jiraDateTime}}
This got the automation to work successfully, but as it turns out, it's because the smartvalue above didn't post any value at all. I was curious if the formatting was just odd in Assets, so I tried adding a .toDate function prior to .jiraDateTime:
{{system."Active Contract"."Contract End Date".toDate.jiraDateTime}}
This achieved the same result as just using .jiraDateTime
To make sure I wasn't doing something odd, I disabled the issue creation and started sending myself emails with the outputs instead. I even used other formats, such as .shortDateTime/.longDateTime/etc., with and without .toDate, but in every instance, I didn't get an output.
Where I did get in output was without the formatting appended: {{system."Active Contract"."Contract End Date"}} - This output successfully in the email as "dd/MMM/yy h:mm a", however, this is the value that triggered a format error in my automation.
With that all being said, there are other things I could try, but I feel like I'm missing something obvious. If anyone has any suggestions, I'd appreciate the assistance.
Disregard, looks like this is a known issue:
My bad for not catching that before posting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.