Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting last status change date in Jira Product Discovery

Olie Ryan-George
Contributor
April 4, 2025

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:

image.pngimage.pngimage.png

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 6, 2025

Hi @Olie Ryan-George 

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

Olie Ryan-George
Contributor
April 7, 2025

Hi Bill,

That worked perfectly. Thanks!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events