I have a formula that i must multiply a custom field number by the original estimate , i find problem because the original estimate have not the number type
so i need to convert it.
Regards
The original estimate is not a "duration", it's a number. Measured in milliseconds, so if you want it in minutes, you need to convert it with
issue.getOriginalEstimate() / 60,000
For hours, divide again by 60. For days/weeks though, again divide, but remember to take into account your time tracking settings (1 day is 8 hours, not 24)
Note - that call above should return a long number if I remember right, but I think it's ok to multiply a long with a double?
Hi, how to do the opposite of that calculation ?
I suppose that i have a number, and i want to put it in the original estimate field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How are you putting it in? Code? Typing? REST call?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
using the smart values
{{#math}}{{issue.customField_10061}}+{{issue.customField_10062}}+{{issue.customField_10063}}+{{issue.customField_10079}}{{/math}}
it works when the sum is an integer, but doesnt when it's real
ex : 1 + 1 + 3 + 2 shows "1d" in the original estimate
or 1.5 + 1.5 + 2 + 1 shows 6h
but when i put 1.5 + 1 + 2 + 3 the rule doesnt execute
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't use smart values, but that looks like a bug in it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried to use JSON,
here is my script
{
"fields": {
"timetracking": {
"originalEstimate": "issue.customField_10087"
}
}
}
where the customfield 10087 is a text field and i've entered as an example : "1h 30m" , but still doesnt work :s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you enter it in milliseconds, as that's the storage format?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
4.5 gives me this result when i do the conversion to milis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, the API is not listening in milliseconds. Have you tried plain 4.5?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Literally feed it a number. The rest API only takes numeric data (I thought it was milliseconds because that's what I see in code elsewhere). 4.5 is likely to be 4.5 hours, but you'll see that when you look again at the issue. Whatever unit it is expecting, it will be consistent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when i add 0.5 to 4.5, it's working and showing 5hours, also if i add 2.5 to 4.5 it shows 1d (as i've set 1day=7hours in the Timetracking settings).
However, i want to have the 4.5 or whateaver (1.75 hours ...etc.) . But it's frustrating because it's not working!
Is it a bug ??? do i have to report it ?
Thank you again for you answers, fixing this problem will have an impact in our Jira projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you saying decimal values are not working?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is very odd, it works for me.
I think, yes, you may need to report it as a bug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you send me a screenshot of how did you manage to make it works ???
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not doing anything differently to you. Hitting the rest endpoint with a curl backed json payload.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm i doing something wrong in this code ???
{
"fields": {
"timetracking": {
"originalEstimate": "issue.customField_10061+issue.customField_10062+issue.customField_10063+issue.customField_10079"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you need to give it a number, not a string of custom field names.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"fields": {
"timetracking": {
"originalEstimate": "4.5"}
}
}
Works for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Me too, but is there a way To parse the value of a cutom field. ???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, your code will need to ask Jira for the data for the fields, do the calculations you need and then send back a number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, i'll try this, but do you have any documentation ? i'm not very familiar with JSON in JIRA, just starting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Assia,
can you solve this issues?
i need this feature and don't know how to configure it.
can you help me if resolved it?
thank's
Azadeh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same issue ,,,, any help in this regard? When my custom field has a value of 4.5 it calculates as 45h! (number field and I pass the value as smart value with "h").
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any solution to the problem described above that entering 4.5 leads to 45h yet?
I am having the same issue when populating the field via Jira Automation with the following formula:
{{#=}}{{triggerissue.timeoriginalestimate}} * 0.85 / 3600 {{/}}
With the input parameter is 10h, I would expect to see 8.5h - what we get is 85h - when changing the 0.85 to a one digit decimal like 0.8 or 0.9 it gives me 8h, 9h respectively.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's the same as given before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you Give Some Example cant able to understand properly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
my formula is
result = Original estimation * double(avp)
original estimation type is duration
avp is a custom field with type double.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.