Content
View differences
Updated by Tobias Dillmann 12 months ago
* add **feature flag** "calculated A calculated value is added as a new project attribute" attribute
* add project attribute type "calculated value" in A calculated value has these details:
* Name
* Formula
* For all projects
* The formulas can include the project following attributes administration from that project:
* if possible, use Primer Integer
* is only visible when the feature flag is set Float
* name Mathematical operators: +, -, \*, /, ( and )
* formula
Other calculated values
* for now, **Order of operations:** Automatic application of the formula is a string field that offers no help mathematical rule where multiplication and division are performed before addition and subtraction, unless parentheses dictate otherwise
* Additionally, constants (float or dropdown when editing
integer numbers) can be added
* only constants are allowed In order to trigger the selection of the attributes in the field, the user can use the command "/" as input for now
implemented in the Automatically generated subjects.
* example formula: `1 + (2 The command triggers a dropdown to open with sections for:
* 3)` Mathematical operators
* the formula is validated and errors are displayed when an invalid formula is inserted Calculated values
* The calculated value should be stored in the new attribute can database. When displaying the value, it should not have to be added calculated on the fly.
* Reasons:
* Lots of read access from multiple places.
* Difficulty to calculate a project
calculated value if it in turn includes a calculated value again.
* no calculation Note that the value stored in the database has to be recalculated under certain circumstances: <mention class="mention" data-id="64352" data-type="work_package" data-text="###64352">###64352</mention>
* Error handling
* In calculations, there is performed error handling for now. Administrators can enter **circular references**.
* In case the user includes text that is **not an integer or a formula, but it float,** the field will not do anything.
display an inline error: "Only numeric values, project factors, calculated values and mathematical operators are allowed"
* In case the mathematical operation fails (e.g. because of a **division by zero error**), the field will display an inline error.
**Out of scope**
* List factors (Project attribute of type list with values)
* Displaying the calculated value (e.g. on the project overview or the project list)
* add project attribute type "calculated value" in
* Name
* Formula
* For all projects
* The formulas can include
* if possible, use Primer
* is only visible when the feature flag is set
* name
* formula
* Additionally, constants (float
* the formula is validated and errors are displayed when an invalid formula is inserted
*
* Reasons:
* Lots of read access from multiple places.
* Difficulty
* Error handling
* In calculations, there
* In case the user includes text that is **not an integer or
* In case the mathematical operation fails (e.g. because of a **division by zero error**), the field will display an inline error.