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?
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.