difference between two number fields

Assia Touati March 26, 2020

HI, 

I have a number field named "previous time spent", and i want to calculate the difference between this field and the timeSpent field. Using automation. 

I tried to write : 

{{issue.timeSpent}}-{{issue.customField_10076}} 

where issue.customField_10076 : is the field that i've created 

but it's not working : it writes me only the timeSpent ! 

 

please i need help ! thanks 

2 answers

1 accepted

0 votes
Answer accepted
Aditya Sastry
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.
March 26, 2020

did you check the output of value in your custom field?

Assia Touati March 27, 2020

i've fixed the problem. 

The cause was that i had to use the math expression {{#=}}....{{/}}for the smart values

exemple : 

{{#=}}{{issue.Invoice Amount}} * 1.2{{/}}
Aditya Sastry
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.
March 27, 2020

cool.

0 votes
Ionascu Irina September 22, 2020

Hello, is this working also to calculate the resolution time of the tickets? For example the time between the creation time and the time the ticket was set as Resolved. I have followed the steps :

1. Create custom field (date time picker type or number type, tried with both of them)

2.  Tried this with the following formula, but it is not working.. 

{{issue.solved.diff(issue.created).days}}

Any idea which might be the problem? I am using Jira server 

Suggest an answer

Log in or Sign up to answer