How to edit a custom field (date picker type), whenever the issue updates, with the current date?

I'm trying to set up an automation where:

Every time the issue updates, it would edit the custom field (date picker) and set it to the current date. I know there's already a field like that, but it's not supported by the Zendesk add-on, so I can't map it out.
That's why I need to create a custom field, so I can map it to Zendesk.

Thank you in advance :)

2 answers

1 accepted

1 vote
Andreas Knecht Community Champion May 21, 2017

Hi Alexander,

There's a couple of ways you can do this.  You can add the date field to the simple form above in the edit issue section and simply use {{now}} as its value.

Or if you're using 'Advanced', then this would work:

{
"fields": {
"customfield_12200": "{{now}}"
}
}

Cheers,

  Andreas

You could do that in each transition postfunction. But this way you will not get the updated timestamp when someone adds a comment or edits the issue.

I never used Zendesk, but are you sure you cant get the value from issue date modified field?

Zendesk's add-on doesn't support the "Updated" field :( How would it be possible to do this through the post functions?

I've checked the postfunctions and I couldn't find a way to edit a custom field, only the system ones :/

I've added the following in an automation, but I guess the syntax is incorrect?

{
"fields": {
"customfield_12200": "Date(now()"
}
}

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

280 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you