Hello,
I am struggling with an automation. Simple, I want to add today's date to a custom field. I used the doc here: Product demo: Automation for Delivery 🤖 - Atlassian Community
Here is my statement:
{
"fields": {
"customfield_10552":"{\"start\":\"{{now.jiraDate}}\",
\"end\":\"{{now.jiradate}}\"}"
}
}
Here is the error I get:
Thank you for your help!
I believe it's because of the quotes surrounding the object that contains start and end props.
When I post your code into jsonlint.com, it shows this:
After I took those out, it also threw errors on the escapes, so try this?
{
"fields": {
"customfield_10552": {
"start":"{{now.JiraDate}}",
"end":"{{now.Jiradate}}"
}
}
}
BTW what kind of custom field type is this?
Thank you Erin. I'm bookmarking this tool.
It's a date field in JDP.
I used the exemple provided by @Hermance NDounga in her documentation. Copy/Paste and changed the field number only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I asked also a new friend, that sometimes, knows a lot. His name is chatGPT. It gave me the right formula and it works:
In your JSON, there is a small issue with the casing of the jiraDate placeholder. In Jira Automation, the correct casing for the current date placeholder is {{now.JiraDate}} with an uppercase "J" and "D".
Here's the corrected JSON:
{
"fields": {
"customfield_10552": "{\"start\":\"{{now.JiraDate}}\",\"end\":\"{{now.JiraDate}}\"}"
}
}
This JSON assigns the current Jira date to both the start and end properties within the customfield_10552 field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Commenting to track if anyone comes up with a solution to this one. My own investigation suggests it might be related to escaping special characters correctly, bbut I haven't been able to invest the time to look into it deeply.
Regards,
-C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.