# Bug OP-11180 - "Group by" options in Cost report are broken

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 12.3.0 |
| Observed in versions | 12.2.0 |
| Sprint | 12.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.2.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

### Steps to reproduce

1.  Add a custom field with a name of 256 characters which is the maximum
2.  Go to the "Time and costs" module either inside a project or global
3.  Observe the "Group by" options.

Original report

1.  Log into <https://qa.openproject-stage.com>
2.  Go to one of your projects and select Time and costs from the side menu.
3.  Once New cost report page is opened, observe the "Group by" options.

### What is the buggy behavior?

"Group by" option looks broken as you can see on the image below

<img class="op-uc-image op-uc-image_inline" style="width:757px;" src="/api/v3/attachments/38794/content">

We think it's a side effect of some recent changes as it currently looks fine on Staging:

<img class="op-uc-image op-uc-image_inline" style="width:1057px;" src="/api/v3/attachments/38795/content">

Moreover, on Edge, if you select one of the options from the "Add group by attribute" dropdown and press Apply, after a couple of times, there is an error message appearing on the screen:

<img class="op-uc-image op-uc-image_inline" style="width:995px;" src="/api/v3/attachments/38796/content">

### What is the expected behavior?

This setting should look the same as on production, should not be broken and we should be able to select group by attributes without any error message.

### Environment information

*Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs*

**OpenProject installation type**

- [ ] Hosted cloud edition
- [ ] Packaged installation
    - What distribution?
- [ ] Docker All-in-one container
- [ ] Docker-compose installation
- [x] Other (please specify): QA Edge, version 12.3.0

**Browser**

- [x] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)
