# Bug OP-9926 - Possible to create invalid project identifier when creating project

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 12.0.9 |
| Observed in versions | 12.0.0 |
| Sprint | 12.0.9 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.0.x |
| 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 |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### **Environment**:

OP production (12.0.7)

qa-edge (12.1.x)

### **Steps to reproduce:**

1.  Create a project that starts with a number (e.g. "5555 Test project"
2.  Look at project identifier / URL (starts with number - which is invalid)
3.  Add "Work package graph" or "Work package table" widget to the project overview page.
4.  Try to configure either of those widgets.

### **Actual Behavior**

Empty widget displayed since project identifier is invalid.

<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/27766/content"></div></figure>

### **Expected Behavior**

Either:  
\- Identifiers starting with numbers are accepted.  
Or:  
\- Initial Numbers are removed from project identifier when creating project.

### Notes

  - this also affects list creation in boards

The payload for the query creation contains a link to the project. Somewhere in the frontend code the project identifier (e.g. '12-monkeys') is mapped to a project id for the link inside the payload.

This mapping works correctly if the identifier starts with a letter, e.g. `monkey-12`. But if it starts with a number, the code assumes this is the project id already and just links to the project with the ID 12 which is wrong (and may not exist, hence the not found error). If a project with this id happens to exist the board will contain another project's work packages\!
