Automation: some dates are not handled as dates

Jesse Maxwell November 16, 2020

I am creating an automation to re-open issues after they have been On Hold for 4 weeks. In the rest response for an issue, there is: `statuscategorychangedate: "2020-11-14T11:56:58.128-0600"` which seems perfect. However, date functions (reference) don't work. I use the Log action to show their values but they come back blank. My Log value is: 

{{issue.fields.statuscategorychangedate.mediumDate}} and {{issue.fields.lastViewed.longDate}}

 Only "and" renders in the Audit Log. Comparison functions also don't work. If I remove `mediumDate`, the full string renders in the Log. 

What am I missing here? How can I render this field nicely?

1 answer

1 accepted

2 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.
November 16, 2020

Hi @Jesse Maxwell 

I had an earlier support ticket on this, and I was told that Status Category Changed Date was implemented as string rather than as a date/time field for some reason.  If you convert it first it should work:

{{issue.statuscategorychangedate.toDate.mediumDate}}

Last Viewed may have the same issue so try the same thing.

Best regards,

Bill

Jesse Maxwell November 16, 2020

That was it – thank you!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events