Forums

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

How to convert Original estimate field into number?

Suchithra s October 18, 2021

I want to copy original estimate field into any of the custom field

3 answers

0 votes
Nic Brough -Adaptavist-
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 19, 2021

There is an underlying thing that I think is worth explaining here.

The original estimate is not really a duration between two times or a list of elapsed weeks, days, hours, minutes and seconds.

Behind the scenes, it is a very simple number of seconds.  Everywhere you see it displayed like "2d 4h 15m" that is some code converting the number of seconds into a "pretty" display string.

So, when you "convert" an estimate to a number field, all you're really doing is copying a number of seconds.  The number field does not know that it is a number of seconds, and does not have any code to display it in the "pretty" format.

If you want it in a format other than a simple number of seconds, you'll have to copy it into a string field and do some coding to make it go through a "pretty" transformation.

0 votes
Suchithra s October 18, 2021

Hi Alex,

 

I tried this post function, but after the transition the text field took the value "None"

 

Regards,

Suchithra S

Alex Koxaras _Relational_
Community Champion
October 18, 2021

In the create transition, copying the value will not work. Also you have to make sure that there is a value within the original estimate field.

0 votes
Alex Koxaras _Relational_
Community Champion
October 18, 2021

Hi @Suchithra s 

You can do that by creating either a Jira automation, or via a workflow post function. E.g. in Jira automation you could create something like the following:

copy estimate.png

Suchithra s October 18, 2021

Hi Alex,

How can I do it from workflow post functions?

(Copy original estimate field value to any of the text custom field)

 

Regards,

Suchithra S

Alex Koxaras _Relational_
Community Champion
October 18, 2021

@Suchithra s  Add a post function like the following one:

copy original.png

Suchithra s October 18, 2021

@Alex Koxaras _Relational_ , That post function didn't work

 

I tried to copy the value to number custom field(Original estimate number), It throws the following error-> Please find attachmentorg est number.png

I tried to copy the value to text custom field(QA ETA), It throws the following error-> Please find attachment

QA ETA.png

Alex Koxaras _Relational_
Community Champion
October 18, 2021

Then use the paragraph custom field. At least this works for me.

Like Suchithra s likes this
Alex Koxaras _Relational_
Community Champion
October 18, 2021

Or, if you had an app like JMWE, you could just copy the value:

post functions.png

 

resultss.png

Suchithra s October 19, 2021

@Alex Koxaras _Relational_ Yes, But it is showing in seconds format. How to Convert?

Alex Koxaras _Relational_
Community Champion
October 19, 2021

To convert it in which format?

Suchithra s October 19, 2021

Minutes / Hours

Alex Koxaras _Relational_
Community Champion
October 19, 2021

You can't convert it. Or at least I can't.

The only way I know of how to really copy the value of Original Estimate (pretty) without converting it, is to use Jira automation with REST API and to copy the {{webResponse.body.fields.timetracking.originalEstimate}} smart value to your text field.

You could achieve that within the workflow with an app that supports API, like JMWE.

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