# Bug OP-10649 - Filters are not working after adding a custom field with default value 

Project: OpenProject
Status: rejected
URL: https://community.openproject.org/work_packages/OP-10649

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 12.3.0 |
| Observed in versions | 12.1.0 |
| Sprint | 12.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.1.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 | Jens Ulferts |
| 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.  You need a project with some work packages
2.  Add a new custom field of type "List"
3.  Add some values and make the first one the default value
4.  Check "Used as filter" 
5.  Assign this custom field to a work package type and this project, so you can use it 
6.  Open the work package overview of this project and add the new custom field as column
7.  Open the filter area and add a filter with the new custom field and the set default value

### What is the buggy behavior?

  - After step 6, all work packages are shown with the new custom field and the default value (which is correct)
  - After step 7, when the filter is active, all works packages are filtered out and disappear although they have the value set in the filter
  - If you change the value of the new custom field of a work package explicitly to the default value, this work package appears and the filter works as expected for this work package.

### What is the expected behavior?

1.  After step 7, the work packages shall be visible

It seems that the new custom field with it's default value is added to the work packages, but there is a second mechanism for filtering where the new field/value is not used.

### **Logs**

### Screenshots and other files

### 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
- [x] Packaged installation
    - Ubuntu Server 20.04
- [ ] Docker All-in-one container
- [ ] Docker-compose installation
- [ ] Other (please specify)

**OpenProject version**

12.1.5

**Browser**

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

**Language**

English / English
