You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
HI @gsharma My name is Habib I shall try my best to help you with the request:
Also, do check out Advanced field editing using JSON
Jira Automation examples: https://community.atlassian.com/t5/Jira-articles/10-Jira-Automation-examples-to-get-you-started/ba-p/1060888
If this helped please accept the answer as this could help others with the same issue as well.
Thanks
Habib.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer. I tried it, but it just prints "{test=date|YYYY-MM-dd}" in my description as it is.
I don't understand the logic here. What is "test" supposed to be? Is it a special string or the title of the current issue? I don't see it documented in the links you provided either.
Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @gsharma
I don't understand the logic here. What is "test" supposed to be
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for the help, but I'm not looking to integrate third-party plugins at the moment. I'm looking for something that can be handled by Jira Automation itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.