How to configure Calculated Fields
The calculated field allows the user to show a score that is calculated using values set in other fields.
The following types of fields can be used in the calculation:
Number Fields
Read-only Number Fields (since Version 2.12.0)
Select Single Fields (with number value)
Rating Fields (since Version 2.9.2)
How to set the expression for the calculation
In the admin panel
Data Forms for Jira Data Forms templates - How to create, customise and delete Data Form templates
Data Forms for Confluence Data Forms templates - How to create, customise and delete Data Form templates | Add fields to a section
Score for Monday How to edit the Score template | Add and configure a new field
you can configure the expression for your Calculated Fields.
The Calculated Field takes a string as the expression. The expression must be written in postfix notation (reverse polish notation).
Here you can find a list with all operators you can use in your calculation.
For more information on the postfix notation check out this link:
https://www.cs.man.ac.uk/~pjj/cs212/fix.html
The ids of the fields you want to use in your calculation are used as placeholders for their values. There needs to be a space between all ids and operators.
Example:
The Calculated Field should show: risk plus impact devided by effort.
The expression with the infix notation would look like this:
(risk-id + impact-id) / effort-id
The postfix notation (reverse polish notation) would look like this:
risk-id impact-id + effort-id /
You can convert infix expressions to postfix expressions here:
Infix to Postfix or Infix to Prefix - Converter & Evaluator
https://www.calcont.in/Conversion/infix_to_postfix
Note that - when setting the expression in the field configuration in the template editor - you will get a list of all fields that could be used in your expression. Meaning: all fields with the right field type, that are already added in the template.
You can copy and paste the ids from that list into your expression.
How to set background colors for different scores (since Version 2.9.2)
(Font colors since Version 2.10.0)
When configuring a Calculated Field you can set formatting rules to highlight certain ranges of scores with a background-color.
Click on the Add formatting rule button. This will create a new formatting rule that can then be configured.
Now you can set a number as start for this rule, another number as end and colors for the background and the font of the score via the colorpickers.
You can add as many formatting rules as you like.
Leaving Start empty and setting End will be interpreted as: all values smaller or equal to End.
Setting Start and leaving End empty will be interpreted as: all values equal or greater than Start.
Note that the rules will be checked from top to bottom and the first that fits will be applied. So in our example -10 will be red. 20 will be yellow. 21 will be green. 10000 will be blue.
Values that are not covert by the rules will be shown with a white background and in a black font.
Â