# Bug OP-19229 - 500 Error on Save when 'Group' selected as User under "Planned Labor Costs" in Budget

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Modules and project features / Costs and budgets |
| Target versions | 17.4.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 | David Friquet |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

*Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?).*

1.  Login as a user with permissions to create/edit budgets.

2.  Go to a project's budget, click to Edit. (Error also occurs when a new budget is created).

3.  Scroll down to "Planned labor costs" and add any amount for hours.

4.  Under "User" select a "**group"** from the drop-down menu.

5.  Click "Submit" - error will appear

### What is the buggy behavior?

*Please describe the bug in as much detail as possible.*

  - A 500 error appears on 'submit' and budget information is not saved.

  - This works correctly when an individual is selected, but not when a group is selected.

### What is the expected behavior?

*Describe how the application should behave like.* 

1.  The budget should successfully save, with the group's planned hours saved. This has worked correctly in the past.

2.  If you select an individual instead it works as expected.

### Screenshots and other files

*If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section.<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/920559/content">*

*<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/920560/content">*

### 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
    
    <br>

**Browser**

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

**Operating System**

- [ ] Windows
- [x] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)

**Language**

*Please specify the browser language and the language of the OpenProject user for which the bug occurred.*
