# Feature OP-19665 - Additional calculation operators for calculated fields

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-19665

## Planning

| Attribute | Value |
| --- | --- |
| Date | 2026-07-15 – 2026-07-16 |
| Priority | Medium |
| Target versions | 17.7.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

| ID | Subject | Status | Decision |
| --- | --- | --- | --- |
| OP-19777 | Why do we cast custom values to `decimal(60,4)` for filtering | new |  |

## Features and Chunks

_No work packages_

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| OP-19816 | Bug | Booleans should be allowed as input for calculated values | closed |  | 17.7.0 |  | Modules and project features / Project attributes |
| OP-19806 | Bug | Fix `XOR` behaviour | closed |  | 17.7.0 |  |  |
| OP-19778 | Bug | Boolean calculated value is not properly formatted in input | closed |  | 17.7.0 |  |  |
| OP-19769 | Task | Document operators, functions and keywords usage | closed | Ivan Kuchin | 17.7.0 |  |  |
| OP-19808 | Bug | Prevent possibility of infinite loop when checking formula references | closed |  |  |  |  |
| OP-19763 | Bug | Handle boolean calculated value in export | on hold | Ivan Kuchin |  |  |  |
| OP-19779 | Bug | Fix float filtering | confirmed |  |  |  |  |
| OP-19771 | Task | Improve tokeniser check | new |  |  |  |  |
| OP-19768 | Task | Allow lowercase operators, functions, keywords | new |  |  |  |  |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Administration / Custom fields |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan | Enterprise / Premium (PRE) |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers | Ivan Kuchin |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** a project portfolio manager  
**I want to** use additional calculation methods based on project attributes  
**so that** I can better evaluate and prioritise projects in my portfolio and communicate this evaluation to my stakeholders (in addition to <mention class="mention" data-id="50086" data-type="work_package" data-text="#50086">#50086</mention> )

**Acceptance criteria**

  - In addition to the available Mathematical operators: `+`, `-`, `*`, `/`, `%` (modulo and percent), `(` and `)` I want to be able to use operators such as
    
      - *Comparison: \<, \>, \<=, \>=, \<\>, \!=, =,*
    
      - *Logic: IF, AND, OR, XOR, NOT, SWITCH*
    
      - *Numeric: MIN, MAX, SUM, AVG, COUNT, ROUND, ROUNDDOWN, ROUNDUP, ABS*
    
      - *Selections: CASE*

  - Only small UX changes needed (as Administration-only feature that builds on existing functionality)

**Technical notes**

  - The library "dentaku" is used for calculated values

  - Dentaku supports the operators listed above, but they are hidden via filter

**Permissions and visibility considerations**

  - Permissions are unchanged

**Translation considerations**

  - *Key terms and phrases in the key languages*

**Out of scope**

  - Changes to the Admin-UI on top of adding the operators to the autocompleter.

  - Built-in support for the user on the syntax of the operators.

  - Error messaging on faulty formulas guiding the user to the faulty part of the formula.

  - Using custom fields other than int, float and weighted item list as input

  - Outputting non numerical values as result (e.g. string)

<br>
