Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×On Cloud I have an automation to update Parent Target Start & End date according to their children.
The condition is passes but the Edit issue part is fails with this error message:
"Key-57 (The Target end must be of the format "yyyy-MM-dd" (customfield_10023), The Target start must be of the format "yyyy-MM-dd" (customfield_10022))."
Here is my date format settings in Admin
Here is the way the date value is displayed on an issue:
And this is the JSON I have under the Edit Issue block of the automation:
{
"fields": {
"Target Start": "{{llookupissues.Target Start.min}}",
"Target End": "{{llookupissues.Target End.max}}"}
}
How can I fix it?
Hi @Yaniv
First, there are typographical errors in your smart values for {{lookupIssues}} references. Smart values are name, spacing, and case-sensitive. Incorrect values are returned as null.
Next, that error message tells you the values are in the incorrect format, and must be passed exactly as "yyyy-MM-dd" but passing just the date values sends them in a longer format.
You may use the jiraDate format, as described here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-format---
For example, please try this:
{
"fields": {
"Target start" : "{{lookupIssues.Target start.min.jiraDate}}",
"Target end" : "{{lookupIssues.Target end.max.jiraDate}}"
}
}
Kind regards,
Bill
Thanks @Bill Sheboy . I made the changes and added the "jiraDate" but still having same error. Even when I tried the option of format("<pattern>") it doesn't work.
{
"fields": {
"Target start" : "{{lookupIssues.Target start.min.format("yyyy-MM-dd")}}",
"Target end" : "{{lookupIssues.Target end.max.format("yyyy-MM-dd")}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK after some diggings I noticed one of your answers in another post where the solution was to force the type of the field using toDate .
Here is my final code:
{
"fields": {
"customfield_10022" : "{{lookupIssues.customfield_10022.toDate.min.jiraDate}}",
"customfield_10023" : "{{lookupIssues.customfield_10023.toDate.max.jiraDate}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that seems correct. Some of the "date" fields are text, or appear as text, inside of rules and must be converted first. I believe this applies to the Advanced Roadmap fields, in general.
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.