Forums

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

Update Jira Date with Automation for Jira using the fix Version Release Date.

Lara Lopez
Contributor
March 2, 2022

Hello,

I am trying to update a custom field Date in my issue with the Release Date of my Fix Version.

I am using  {{issue.fixVersions.releaseDate.format("d/MMM/yy")}} which works in the comments, but does not work in the Date custom field I have.

I have tried different formats and the dates appear correctly in the comments but the field does not get updated. Can anyone help with the right format?

When I edit my issue Jira says it expects the d/MMM/yy format.

Best Regards

2 answers

1 accepted

0 votes
Answer accepted
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2022

Hi @Lara Lopez 

Can you try this :

{{issue.fixVersions.releaseDate.format("yyyy-MM-dd")}}

Also look at the audit log of your rule, you should find which format is expected.

Lara Lopez
Contributor
March 3, 2022

Thanks Mohamed it worked!

That format is nowhere in our dates, but it seems it was the right one!

James Navin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2022

Hi @Lara Lopez ,

You can also use the predefined "jiraDate" format:

{{issue.fixVersions.releaseDate.jiraDate}}

There are a number of predefined date and time formats available - see https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/ for examples.

Cheers,

James

Lara Lopez
Contributor
March 3, 2022

Thanks James, I tried a lot of formats because the edit screen said d/MMM/yy but our view is dd.MM.yyyy. It seems I overlooked in the documentation the jiraDate possibility. 

Thanks a lot!

0 votes
Derrick L
Contributor
September 21, 2022

I have a similar problem, copying Due date (system) to a Target End Date

{
"fields": {
"customfield_12856": "{{issue.Due.format("yyyy-MM-dd")}}"
}
}

Error: The Target end must be of the format "yyyy-MM-dd" (customfield_12856)

Derrick L
Contributor
September 21, 2022

nvm, found the issue. It should be {{issue.Due date.format("yyyy-MM-dd")}. Confusing that it allows spacing

Suggest an answer

Log in or Sign up to answer