Forums

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

Jira Automation - How to format date from changelog

CEDRIC DEVAUX
Contributor
October 26, 2023

Hi community,

 

I have to transfer ticket from team-managed to company-managed.

Inside the team-managed project, users have created customfield with the date format and when I will move ticket to company-managed the value of this customfield will be deleted as the customfield only exists on the company-managed project.

My solution is to create a customfield and then retrieve value from team managed customfield.

I use jira automation to do it.

My rules is:

Trigger Issue Moved: from project A to project B

I create a variable and the smart value is based on changelog

Then I edit my company managed customfield with my variable.

Below my config

Automation rule 01.pngAutomation rule 02.png

 

When I try my rule, I have the following error:

Automation rule 03.png

 

How I can format the changelog in order to have in jra date format?

 

Thank you

1 answer

1 accepted

1 vote
Answer accepted
Mohamed Benziane
Community Champion
October 26, 2023

Hi,

You can use the dateformat option in automation

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#--

try this :

{{estimation.jiraDate}}

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2023

Hi @CEDRIC DEVAUX 

Adding to Mohamed's answer...

As you are using a text value (either from the changelog or the variable), it must first be converted to a date type before using it.  For example:

{{estimation.toDate}}

And if that does not work, you may need to parse the field with text functions to get the conversion to work.

Kind regards,
Bill

Like CEDRIC DEVAUX likes this
CEDRIC DEVAUX
Contributor
October 27, 2023

Hi Mohamed & Bill,

 

I tried {{estimation.jiraDate}} and it's not working.

@Bill Sheboy {{estimation.toDate}} works !!

 

Thank you all for your help

 

Kind regards,

 

Cedric

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events