# Bug OP-15711 - Custom fields with format string, text, bool, link and date don't forbid multi select internally and have handling in ordering

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.6.0 |
| Observed in versions |  |
| Sprint | 14.6.0 |
| 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 | Ivan Kuchin |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

`CustomField::OrderStatements` handles multi-value custom fields for formats `string`, `text`, `bool`, `link` and `date`. UI doesn't allow setting multi value for those formats, also there doesn't seem to be any restriction in controller or model. Also `CustomField#multi_value_possible?` lists only `version`, `user` and `list` as possible for multi-value. It also doesn't make sense to be able to order by text (long text) custom fields.

Should `CustomField` validate multi value field and should we remove handling of multi value from order statements?

Acceptance criteria:

  - It is still possible to create custom fields of types `string`, `test`, `bool`, `link` and `date`

  - It is still possible to create custom fields of types `version`, `user` and `list` both allowing and not allowing multiple values
