Hi team,
We have some automations which are calculating the costs or time of the projects depending on the rate (customfield_10181), actually we have this expressions to calculate it:
To the costs we multiply the hours with the rate and to the opposite we divide it:
Examples:
{{#=}}{{issue.ENE21 Plan H}} * {{issue.customfield_10181}}{{/}}
{{#=}}{{issue.FEB21 Plan H}} * {{issue.customfield_10181}}{{/}}
{{#=}}{{issue.MAR21 Plan H}} * {{issue.customfield_10181}}{{/}}
...
{{#=}}{{issue.ENE21 Plan €}} / {{issue.customfield_10181}}{{/}}
{{#=}}{{issue.FEB21 Plan €}} / {{issue.customfield_10181}}{{/}}
{{#=}}{{issue.MAR21 Plan €}} / {{issue.customfield_10181}}{{/}}
This are working fine but there are showing errors if the users are deleting the values and putting some number field on null, we tried to use some expressions to controlling it but it doen't work fine either, I think it can be something like this:
{{#=}}{{IF(issue.ENE21 Plan H == null, 0, issue.ENE21 Plan H)}} * {{issue.customfield_10181}}{{/}}
{{#=}}{{IF(issue.FEB21 Plan H == null, 0, issue.FEB21 Plan H)}} * {{issue.customfield_10181}}{{/}}
{{#=}}{{IF(issue.MAR21 Plan H == null, 0, issue.MAR21 Plan H)}} * {{issue.customfield_10181}}{{/}}
{{#=}}{{IF(issue.ABR21 Plan H == null, 0, issue.ABR21 Plan H)}} * {{issue.customfield_10181}}{{/}}
...
{{#=}}{{IF(issue.ENE21 Plan € == null, 0, issue.ENE21 Plan €)}} / {{issue.customfield_10181}}{{/}}
{{#=}}{{IF(issue.FEB21 Plan € == null, 0, issue.FEB21 Plan €)}} / {{issue.customfield_10181}}{{/}}
{{#=}}{{IF(issue.MAR21 Plan € == null, 0, issue.MAR21 Plan €)}} / {{issue.customfield_10181}}{{/}}
If someone knows how to solve it, it would be very helpfull to our team.
Thanks in advance,
Mario