Hi everyone,
I've got a field for my Jira Product Discovery project which is designed to show when the status of an idea (or ticket) was last changed so we can track how long an idea has been stagnant for.
The only way I could work out how to do this was via an automation. However, I can't seem to get the automation to work.
I've had to use the additional fields textbox with the following content:
{ "update": { "customfield_10868": [ { "set": { "start": "2025-04-04", "end": "2025-04-04" } } ] } }
This is how the custom field shows in an API call:
"customfield_10868":"{\"start\":\"2025-02-25\",\"end\":\"2025-02-25\"}"
I've tried to follow this documentation but can't work out what the most relevant parts are for my particular case due to having the start and end fields (which I always want to be today's date when the automation runs - I know how to do the today's date bit though and am trialing with a single date first for simplicity).
The issue I'm getting for the above when I run the automation is:
ROAD-192 (Operation value must be a string (customfield_10868))
Can anyone help me with either an easier approach to this problem or a solution to how I can edit these fields with this automation?
Here are some screenshots that may help:
The Jira Product Discovery (JPD) date fields are JSON represented as text. And, as with many of the JPD fields, they can only be set with advanced edit with JSON in rules.
Putting those together, you could use the {{now}} smart value, formatted as jiraDate to set your field:
{
"fields": {
"customfield_10868": "{\"start\":\"{{now.jiraDate}}\",\"end\":\"{{now.jiraDate}}\"}"
}
}
To access that as a date for other rule needs, there is a relatively new function to help jsonStringToObject(): https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#jsonStringToObject--
With that, the attributes can be accessed like this:
{{jsonStringToObject(issue.customfield_10868).start.toDate}}
Kind regards,
Bill
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.