Making JPD Dates look 'pretty' when copying into Jira delivery

Kate
Contributor
February 17, 2025

I have an Automation in JPD that when an idea meets certain parameters, a ticket is created in a delivery project. As part of this automation, details like the Reporter Name and Due date are copied into the Description field.

In the JPD space, the Delivery Target Date is custom field '11517'. 

What I am hoping is that someone has figured out a way to make the display of the date from JPD look user friendly/pretty?

JPDtoJira-Dates.png

The best I have found is the smart value 
{{triggerIssue.customfield_11517.match(".*end\":\"(.*)\".*").toDate}} which has the output 2025-03-31T00:00:00.0+0000

Has anyone come up with anything else? Bonus points if it matches a DD/MM/YY (aka NZ/Aus) date format

2 answers

0 votes
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.
February 18, 2025

Hi @Kate 

The JPD dates are formatted as JSON, although they are recognized as text in rules.  With the new function jsonStringToObject(), the dates may be accessed with their attributes.

For example, this would access the "start" attribute: 

{{jsonStringToObject(issue.customfield_11517).start}}

And if you needed a different date format, the text may be converted to a date then formatted it as needed: 

{{jsonStringToObject(issue.customfield_11517).start.toDate.jiraDate}}

 

Kind regards,
Bill

Kate
Contributor
February 18, 2025

Oh, thank you for the options and even more so for the explanation. I will give these a go now!

Like Bill Sheboy likes this
0 votes
Marek Bujak February 18, 2025

My idea was {{issue.customfield_"JPD-Date-Field".jsonEncode.left(23).right(10).toDate.jiraDate}} and it seems to be working

Kate
Contributor
February 18, 2025

Oh, thank you for this, will give it a test now :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events