Basic formula allows base arithmetic operation on attributes
Basic formulas allows you to perform base calculation involving other attributes and constant numbers.
For example, you can write :
This will fetch the values of attributes Unit Price, Quantity, VAT and Discount and display the result in your calculated attribute.
If you need to reference an issue field in your formula, you will need to use Advanced formula
Basic formula allows arithmetic operations :
|Addition||load + 5.3|
|Substraction||load - 5.3|
|Multiplication||load * 0.9|
load / 2
Precedence and grouping
Multiplication and division have priority over addition and substraction. You can use parenthesis to group operations.
Supported attribute types
You can reference the following attribute types in your formula:
|Number||Number attributes evaluate to their value in formulas||12.25|
|Checkbox||Checkboxes evaluate to 1 when checked, 0 otherwise||1|
|Calculate||Calculate attribute evaluate to the calculation result. This result is a number||23.21|
Empty references (attribute value is not set) will evaluate to zero.
Division by zero
Division by zero
If you divide by zero, an error message 'Division by zero' will be displayed in the attribute in the issue view.
If you reference another calculate attribute which in turn references your attribute, this will create a circular reference. And error message 'Circular reference' will be displayed in the attribute in the issue view.
Error in reference
Reference evaluation error
If an error occurs in the evaluation of a referenced calculate attribute, the error message is displayed in the attribute in the issue view.
Next ➡ Advanced formula