Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can't manage to make numerical operation with calculated field

Iana June 18, 2021

I have a calculated field that aggregates the time spent in the stories of an Epic and displays that aggregation on the Epic (see screenshot 1). 

Auto1.PNG

I want to set up an automation rule where I substract the Epic Time Spent from the Epic Remaining Estimate. I manage to recuperate the raw values (in seconds) from both fields, but when I try to make a numerical operation between the two, I get nothing (see screenshot 2). 

Auto2.PNG

 

Here's the rule's outgoing message :

Le temps restant sur l'epic est {{issue.timeestimate}} et le temps passé est {{issue.customfield_12406}} alors le vrai temps restant est {{issue.timeestimate.minus(issue.customfield_12406)}}

I suspect the problem comes from the fact that the Epic Time Spent field uses the point (.) instead of the comma (,) as a decimal separator (here we use the comma). Do you know how automation interprets that information then? I assumed it interpreted as text/String, but when I try to apply any of the String functions listed in the Automation Doc (Text functions | Automation for Jira Data Center and Server 7.0 | Atlassian Documentation)to it, it doesn't work. 

Do you have an idea of what I could do to make it work?

Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted
nmenere
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2021

Hi @Iana ,

Can you try the following and see what it puts in the log:

{{#=}}{{#debug}}{{issue.timeestimate}} - {{issue.customfield_12406}}{{/}}{{/}}

That should tell us exactly what it is trying to evaluate.

Cheers,
Nick Menere
Automation Group Product Manager

Iana June 23, 2021

It works, thanks. The problem wasn't the calculated field but the syntax for substractions. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events