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 products 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."

(Auto-migrated image: description temporarily unavailable)
(Auto-migrated image: description temporarily unavailable)

When using below JSON in JPD project Automation rule:

1 {"fields":{"customfield_XXXXXX": "{{now}}"}}

Environment

Jira Product Discovery (Cloud)

Cause

Essentially, these date fields within JPD are actually a date range field, and the range is expressed with a start and end value, in the format of: {"start":"2022-12-01","end":"2022-12-31"}.

This is a little different than dates elsewhere in Jira, and because of this, if we want to copy a date from another Jira issue or use a Jira function to pull the current date, we need to format it to match what JPD is expecting.

Solution

By inserting the smart value for the current time within the data structure (and also escaping the internal double quote characters):

1 "{\"start\":\"{{now.jqlDate}}\",\"end\":\"{{now.jqlDate}}\"}"

It will automatically set the date for a custom field in Jira Product Discovery Project.

Updated on March 20, 2025

Still need help?

The Atlassian Community is here for you.