I am setting up an automation to sync or copy date fields between a Jira Discovery (JDP) project and JSM project.
So far, I am able to successfully sync the date from the JSM to JDP, but encountering issues when trying to sync from JDP to JSM
JSM FieldName : Deadline // customfield_11307
JDP FieldName : Deadline DP //customfield_11308
I understand that date field in JDP is 'actually an array of two text values representing dates (start & end)' therefore we cannot use JIRA date field on JDP, so I created JDP global field 'Deadline DP'. If there is a supported method to use a standard Jira date field directly within JDP, please do correct me.
Below is the automation for JDP -> JSM, I have separate working rule for JSM-> JDP.
trigger: Value changes
branch: for linked issues
Log action: Extracted start: {{triggerIssue.customfield_11308.substringBetween("start\":\"","\",\"end")}}
edit issue:
{
"fields": {
"customfield_11307": "{{triggerIssue.customfield_11308.substringBetween(\"start\":\"\",\"\",\"end\")}}"
}
}
Log action shows extracted date, but fails to update JIra field


I have tried other options like:
{
"fields": {
"customfield_11307": "{{triggerIssue.customfield_11308.match(\"\\\"start\\\":\\\"(.*?)\\\"\").get(0)}}"
}
}
Audit log:
Error editing issues
TP-218 (The Deadline must be of the format "yyyy-MM-dd" (customfield_11307))
Issues edited successfully
TP-218
Any help or clarification is appreciated.
Thanks,
Sushil