Embed Smart value date in description

gsharma March 22, 2023

Hello,

 

I'm creating a new Jira issue using Automation and would like to insert a date (with the calendar picker) in the description using markdown. I can get the date to be added as a string, but not as a calendar picker date. Here is what I've tried:

{{triggerissue.dueDate.jiraDate}} # Prints the date as string

{{{{triggerissue.dueDate.jiraDate}}}} # Specific date like {{2023-01-01}} is supposed to work as markdown but doesn't work using automation

{{ {{triggerissue.dueDate.jiraDate}} }} # Doesn't print the date

\{\{{{triggerissue.dueDate.jiraDate}}\}\} # Shows an error about invalid format

 

Is there any other way to handle this?

1 answer

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 27, 2023

Hi @gsharma

So I thought @habib rahman might be on the right track with Advanced field editing using JSON, although in his examples he's not actually using the field where you would put JSON.

But nevermind all that.

I looked at the API endpoint (example, https://YOURSITE.atlassian.net/rest/api/3/issue/PROJECT-123) for an issue with a description that contains a date picker, and it looks like this:

"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "date",
"attrs": {
"timestamp": "1679875200000"
}
},
{
"type": "text",
"text": " "
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This is the date."
}
]
}
]
},

And well, I tried putting that in the correct place to enter JSON:

{
    "fields": {
        "description": THEJSONBLOCKFROMABOVE
    }
}

And unfortunately it looks like Advanced editing using JSON, at least when it comes to the Description field, does not support anything but strings, as I got this error:

HELP-51 (Operation value must be a string (description))

I also tried putting "This date: {date|03/27/2023}" as description in JSON and that also only resulted in the same thing you saw.

As far as I can tell, there was never any kind of {date} markdown macro for the date picker. I've checked the Internet Archive for this page:

And this one:

Sorry I don't have better news for you.

Suggest an answer

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

Atlassian Community Events