Forums

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

Copy data from time tracking field to custom field using automation

Filip Novák February 7, 2023

Hello all, 

I need to solve an issue, where we are using the time tracking in Jira and I need to copy the data from the "Original estimation" filed to my custom field with every change and with every new creation. 

My custom field has to be the number.

I used the Jira automation, but Jira is giving me information, that Jira was not able to convert the field value into the number.

Here is the formula I am trying to use: 

{
"fields": {
"Sledování času [TEST2]": "{{timetracking.originalEstimate}}"
}
}

Thank you for any help. 

1 answer

1 accepted

0 votes
Answer accepted
Vamsi Kandala
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.
February 7, 2023

Hi @Filip Novák

Welcome to the Atlassian community!

Can you try replacing 'Sledování času [TEST2]' with the custom field id like 'customfield_xxxxx'?

Also, can you provide the screenshot of how you have setup the automation rule and what is the actual error if any?

Thanks,
Vamsi

Filip Novák February 7, 2023

Hello @Vamsi Kandala , 

I did replace it. 

Here is the issue:
issue1.pngVýstřižek2.PNGVýstřižek.PNG

Vamsi Kandala
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.
February 7, 2023

Hi @Filip Novák

Thank you for providing the screenshots.

The original estimate value is measured in milliseconds.  So, you can choose to convert the value accordingly depending on whether you want the value to be in minutes or hours etc.

{{timetracking.originalEstimate / 60,000}} should give you the value in minutes.  Can you try this?

Regards,
Vamsi

Filip Novák February 7, 2023

@Vamsi Kandala Now I am receiving success message, but the value of the custom field remain NULL.

Can you help me to solve this? 

Thank you, 
Filip

Výstřižek4.PNGVýstřižek3.PNG

Vamsi Kandala
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.
February 7, 2023

Hi @Filip Novák

Hmmm...sorry that it not work out.

Let me check for some other solution.

Thanks,
Vamsi

Filip Novák February 8, 2023

@Vamsi Kandala Thank you. Let me know if you find something.

Filip Novák February 13, 2023

@Vamsi Kandala the solution was: 
{{issue.Original estimate}}/60
Or if we wanted hours format /3600 instead. 

Like Vamsi Kandala likes this
tatevikalaverdyan April 29, 2024

Hello Filip,

I tried this solution, but get this kin of error. Can you help me?

Error editing issues
AL-8760 (No unit for '/3600' (customfield_21623))
My Automation is this:

{
"fields": {
"Initial Remaining": "{{issue.Remaining estimate}}/3600"
}
}

Suggest an answer

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

Atlassian Community Events