# Bug OP-19811 - Accidentally using a date for calculated value will cause either 500 or cause "unknown error"

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 17.7.0 |
| Observed in versions |  |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

No spaces in the formulas is important, pattern for date is `A-B-C` where `A` - 2+ digits, `B` and `C` &nbsp;- 1 or 2 digits.

1.  Create a calculated value project attribute and enable it for all projects
    
2.  Use formula `10-20-30` or `2010-01-32` - problem 1
    
3.  Use formula `10-1-1` or `2010-01-01`
    
4.  Go to any project - problem 2
    

### What is the buggy behaviour?

*   A 500 error in case of problem 1
    
*   `An unknown error occurred. Please review the formula for this Calculated value.` in case of problem 2 is displayed for the value
    

### What is the expected behaviour?

1.  Successful formula change in case of problem 1
    
2.  Correct value for math calculation in case of problem 2
