To set date type custom field via Automation rule when using JSON value {{now}} throws an error in Jira Product Discovery Project.
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
When we automatically set the date for a custom field via Automation rule using JSON value as {{now}}, it has below error
Error editing issues " We couldn't save your changes. Copy your content, then try reloading the page."


When using below JSON in JPD project Automation rule:
{"fields":{"customfield_XXXXXX": "{{now}}"}}Environment
Jira Product Discovery (Cloud)
Cause
Jira Product Discovery date fields are date range fields. They expect both a start value and an end value in the format {"start":"2022-12-01","end":"2022-12-31"}. When using the current date, use {{now.jqlDate}} for both values and escape the internal double quote characters.
Solution
By inserting the smart value for the current time within the data structure (and also escaping the internal double quote characters):
"{\"start\":\"{{now.jqlDate}}\",\"end\":\"{{now.jqlDate}}\"}"It will automatically set the date for a custom field in Jira Product Discovery Project.
Was this helpful?