Hi everyone,
I'm using JIRA Data Center(Atlassian Jira Project Management Software (v9.12.17)) and trying to set up an automation rule in Jira, but I'm running into a date parsing issue.
Here are the relevant fields I'm working with:
| Field Name | Type | ID / Source |
|---|
| Target Start | Target Start | customfield_17971 |
| Target End | Target End | customfield_17972 |
| Estimates (d) | Number | issue.timetracking.remainingEstimateSeconds |
Both Target Start and Target End are expected to be Date fields. However, they show as “Target Start” and “Target End” under the Type column, which makes me unsure if they’re actually treated as Date fields.


What I’m trying to do:
When the Estimate is updated and Target Start is not empty, I want to automatically set:
<span>Target End = Target Start + Estimate (in workdays) </span>
My smart value expressions:
Variable for workdays:
<span>{{issue.timetracking.remainingEstimateSeconds.divide(28800).round}}</span>Update JSON:
<span> "fields": <br> {
"customfield_17972": "{{issue.customfield_17971.plusBusinessDays(workdaysToAdd).jqlDate}}"
}
}<br><br>{<br> "fields": <br> {<br> "customfield_17972": "{{issue.customfield_17971.jiraDate.plusBusinessDays(4)}}"<br> }<br>}<br><br>{<br> "fields": <br> {<br> "customfield_17972": "{{issue.customfield_17971.plusBusinessDays(4)}}"<br> }<br>}<br><br></span><span><br>ALL OF FOLLOWING HAS THE ERROR:<br><br>{</span>
The problem:
I get the following error when the rule runs:
<span>Error parsing date string: (customfield_17972</span>)
I’ve verified that customfield_17971 (Target Start) is not empty during testing. Any idea why the .plusBusinessDays() or .jqlDate part is failing here?
Appreciate any help or clarification on this — especially if there’s a better way to format or update Date fields using smart values in automation!
Thanks!
UPDATE:
Tired another syntax as follow
WORKS!
------------------------------------
{
"fields": {
"customfield_17972": "{{issue.customfield_17971}}"
}
}
{
"fields": {
"customfield_17972": "2025-10-10"
}
}
---------------------------------------
DOESN'T WORKS (same error: <span>Error parsing date string: (customfield_17972</span>))
---------------------------------------
{
"fields": {
"customfield_17972": "{{issue.customfield_17971.plusBusinessDays(workdaysToAdd).format(\"yyyy-MM-dd\")}}"
}
}
{
"fields": {
"customfield_17972": "{{issue.customfield_17971.plusBusinessDays(workdaysToAdd.asNumber).format(\"yyyy-MM-dd\")}}"
}
}
---------------------------------------
And I noticed that this function:
plusBusinessDays()
Need an Integer for the parameter, so after reading this post: https://community.atlassian.com/forums/Jira-questions/Is-it-possible-to-use-a-smart-value-within-the-minusBusinessDays/qaq-p/1557511#U3072188
I tried to put log like this:
workdaysToAdd = {{workdaysToAdd}} \n
now = {{now}} \n
now format = {{now.format("yyyy-MM-dd")}} \n
issue.customfield_17971 = {{issue.customfield_17971}} \n
now.plusBusinessDays(1) = {{now.plusBusinessDays(1)}} \n
now.plusBusinessDays(1) format = {{now.plusBusinessDays(1).format("yyyy-MM-dd")}} \n
now.plusBusinessDays(workdaysToAdd) = {{now.plusBusinessDays(workdaysToAdd.asNumber)}} \n
now.plusBusinessDays({workdaysToAdd}) = {{now.plusBusinessDays({workdaysToAdd.asNumber})}} Output as follow:
workdaysToAdd = 70 \n
workdaysToAdd asNum = \n
now = 2025-07-20T16:11:20.5+0000 \n
now format = 2025-07-20 \n
issue.customfield_17971 = 2025-07-25 \n
now.plusBusinessDays(1) = 2025-07-21T16:11:20.5+0000 \n
now.plusBusinessDays(1) format = 2025-07-21 \n
now.plusBusinessDays(workdaysToAdd.asnumber) = \n
now.plusBusinessDays({workdaysToAdd}.asNumber) =
So, what I suspect this far:
Smart value variables created using Create variable seem to be treated as Strings.
.asNumber is not supported in my Jira environment, so I can’t force the type conversion.
This may be causing plusBusinessDays(workdaysToAdd) to fail silently, since it's expecting a number but receiving a string.
Has anyone found a reliable way to pass a dynamic number (like estimate in days) into plusBusinessDays()?
Note: I still need to skip the weekend