How to get {{duedate.shortDate}} working with changelog fromString - toString

Garret Zhang July 24, 2023

Hi,

Pretty much what the title says, I can't figure out how to get shortdate working with changelog.

{{#changelog.duedate.shortDate}}{{fromString}} - {{toString}}{{/changelog.duedate.shortDate}}

 

Thanks,

Garret

3 answers

2 accepted

2 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2023

Hello @Garret Zhang 

The information is stored in the Change Log as a string. You need to convert it to a Date and then you can apply the date formatting function.

I did that in two steps by first assigning the value to a variable and then applying the conversion and format to that variable.

Screen Shot 2023-07-24 at 3.34.40 PM.png

Garret Zhang July 24, 2023

worked! thank you as always! :)

0 votes
Answer accepted
Garret Zhang February 19, 2024

@Trudy Claspill - Do you know if I can apply this to custom field? None of the below works...

{{#changelog.SIMActivationDate}}{{toString}}{{/}}

{{#changelog.customfield_11712}}{{toString}}{{/}}

{{#changelog.issue.customfield_11712}}{{toString}}{{/}}

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2024

Hello @Garret Zhang 

The last one definitely won't work. There is no issue object within the changelog.

 

What are the types of the custom fields?

Can you share the automation rule in which you are trying to use them?

What is the trigger for the rule?

Have the specified fields actually been changed within the event that triggers the rule?

Garret Zhang February 19, 2024

@Trudy Claspill - I actually started in another post and have this resolved. I didn't know space is accepted in the smart value.

This one worked: {{#changelog.SIM Activation Date}}{{toString}}{{/}}

 

Thanks for the quick response!

0 votes
Dan Tombs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2023

Hey @Garret Zhang

 

Thanks for the post. Can you share a screenshot of the rule so we can better understand what is going on.

Garret Zhang July 24, 2023

Rule:

1.png

 

What I see:
2.png

 

What I want to see:

      7/19/2023 - 7/20/2023

(If I can somehow strikethrough the first date, that would be even better)

 

Prefer:

      7/19/2023 -> 7/20/2023

Suggest an answer

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

Atlassian Community Events