How can I set Target Start to present day?
Asked by Julia:

***I AM ON JIRA SERVER***

I want to set the value of Target Start to be the present day, but this JSON is returning an error saying the value has to be a string. Anyone can help?

![Screen Shot 2021-11-01 at 8.58.21 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/167484i0EFC9C1B836EF7D4/image-size/large?v=v2&px=999 "Screen Shot 2021-11-01 at 8.58.21 AM.png")


Answers:
author: Darryl Lee
body: So... this may just not be possible:

As [@John Funk](https://community.atlassian.com/t5/user/viewprofilepage/user-id/7148) wrote back in Nov 2020:
[This is the second time in a couple of weeks where people are having trouble in Automation with the Target Date. It "seems" to be a typical date field type, but it doesn't behave as one when using Automation.](https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-to-Copy-Target-Start-End-to-Cloned-Issue/qaq-p/1526340#M106257)  
And [@Bill Sheboy](https://community.atlassian.com/t5/user/viewprofilepage/user-id/1685313) found:
> According to this Code Barrel ticket, the Portfolio and Advanced Roadmap fields are not supported yet:
>
> <https://codebarrel.atlassian.net/browse/AUT-1370>

Alas, that Improvement request still appears to be open. :-{

comments: author: Darryl Lee
body: Same ticket in Atlassian's system: <https://jira.atlassian.com/browse/JIRAAUTOSERVER-159>


author: Rick Dorgan
body: I wrote a rule to update the target start when a ticket transitions from To Do -\> In Progress, which works perfectly. Hooe this helps. Here's the custom JSON: ![Screenshot 2024-01-18 at 11.04.15?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/301270iA31A3746D88A7D05/image-size/large?v=v2&px=999 "Screenshot 2024-01-18 at 11.04.15?AM.png")

{  
"fields": {  
"Target start": "{{now.jiraDate}}"  
}  
}


author: Pablo de Dios
body: Hello the attr for the field "Target date" is "customfield_11001" you can export to XML any Epic or Task and check this...


author: Julia
body: Also, it is a locked custom field. This custom field is created and required by Portfolio for Jira.

comments: author: Darryl Lee
body: Looks like "Target Start" is just a date (without a timestamp)? Maybe try:

    {{now.jiraDate}}

Some other functions you might try are here: <https://confluence.atlassian.com/automation/date-and-time-functions-993924864.html>


author: Julia
body: I just tried that and got the same error.

Here is the error I am receiving:

"(Operation value must be a string (customfield_14202))"


author: Darryl Lee
body: It would be helpful to do some [debugging](https://confluence.atlassian.com/automation/debugging-your-first-rule-993924612.html) to see what an existing value looks like (to Automation).

So I would create a new rule with a [Manual Trigger](https://confluence.atlassian.com/automation/triggers-993924804.html#Triggers-manual) that doesn't do anything but do a Log action with a message of:

```
Target Start: {{issue.customfield_14202.value}}
```

And then [manually trigger](https://confluence.atlassian.com/automation/manually-run-a-rule-against-an-issue-993924645.html) the rule from an issue that already has Target Start set, then look at the Audit log for this new rule to see what a "valid" value looks like.

I suppose you might also try:

```
{{now.toString}}
```


author: Julia
body: [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322)

I tried that, and the Target Start is set on the ticket, but the audit log shows up empty. Photos attached. ![Screen Shot 2021-11-01 at 12.37.04 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/167505i2893A7906781E247/image-size/large?v=v2&px=999 "Screen Shot 2021-11-01 at 12.37.04 PM.png")![Screen Shot 2021-11-01 at 12.36.56 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/167506i15C92A711434881E/image-dimensions/293x154?v=v2 "Screen Shot 2021-11-01 at 12.36.56 PM.png")


author: Darryl Lee
body: I guess I would also try seeing if you get anything for these Smart Values:

{{issue.Target Start}}

{{issue.Target Start.value}}

{{issue."Target Start"}}

{{issue."Target Start".value}}


author: Darryl Lee
body: Oh and also: {{issue.customfield_14202}}


author: Julia
body: [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322)

{{issue.customfield_14202}} worked and returned this value

2021-11-02

How do I take this information and move forward with configuring the automation


Tags: date

server

smart-value