Forums

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

How to copy dates using automation: to track delays

Wim-Jan Lam November 6, 2025

We have defined a few date fields in JPD:

  • Project target
  • Original target

I want to use automations to populate the Original target date with a copy from the Project target date field when those are populated the first time with a quarter/month/day value.

I have the following steps in an automation rule (named: Copy the first Project target date to Original target date):

  1. When: value changes for Project target (Change type = value added; For = Create / Edit work item)
  2. Condition: Issue type = Idea
  3. Then: Re-fetch Work item data
  4. And: Edit Work item data (with advanced editing, see below)

When I've hardcoded the date values it populates the Original target date field correctly:

{
"fields": {
"customfield_11819":
"{\"start\":\"2026-10-01\",\"end\":\"2026-12-31\"}"
}
}

However if I try to use smart values it fails, example below:

{
"fields": {
"customfield_11819":
"{\"start\":\"{{issue.customfield_11444.start}}\",\"end\":\"{{issue.customfield_11444.end}}\"}"
}
}

Error from audit log:  (no valid interval: {"start":"","end":""})

I'm getting tired of Copilot and ChatGPT confidently saying they understand the problem and suggesting something that then doesn't work.

Now I turn to the kindness of my fellow JPD travelers... 

What is the correct date-formatting-qualifier to use for extracting the start- and end-date from a custom date field and populate them in another custom date field in JPD?

1 answer

1 accepted

0 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.
November 6, 2025

Hi @Wim-Jan Lam -- Welcome to the Atlassian Community!

As you observed, Jira Product Discovery (JPD) uses its own date field format: it is a text representation of JSON, allowing it to store a single date, a date range, or a date-quarter.

But...rules do not recognize it as JSON for dot-notation access until it is parsed, such as with the jsonStringToObject() function.

You may use that function to access your first field to set the other:

{{jsonStringToObject(issue.customfield_11444).start}}

and

{{jsonStringToObject(issue.customfield_11444).end}}

 

As the values are identical layouts, you could also try just setting it directly:

{
"fields": {
"customfield_11819": "{{issue.customfield_11444}}"
}
}

 

And, when you need to use them as actual date types (e.g., when using other date functions), you may convert the value with the toDate function:

{{jsonStringToObject(issue.customfield_11444).start.toDate}}

 

Kind regards,
Bill

Wim-Jan Lam November 7, 2025

That is an excellent answer! In hindsight I was so close when I tried the following:

{
    "fields": {
        "customfield_11819": "{{customfield_11444}}",
    }
}

 And missed to add issue. to customfield_11444. 

Thanks for the help!

Like Bill Sheboy likes this
Wim-Jan Lam November 7, 2025

And for my next step I'm going to use the first half of your answer!

Where I'll try and figure out how to calculate delay in weeks by extracting only the end dates from the two fields and calculating the difference in weeks.

So thanks again for taking the time and providing an answer beyond just: here's the solution to your question.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events