# Bug OP-5167 - Renaming of custom field is not reflected in query filter selection

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 8.0.2 |
| Observed in versions | 8.0.0 |
| Sprint | 8.0.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 8.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

**How to reproduce**

1.  Create custom field "A"
2.  Filter using this custom field "A" in work packages view
3.  Rename custom field to "B"
4.  Try to filter using custom field "B" in work packages view

**Expected Behaviour**

You can filter by "B".

**Actual Behaviour**

You can only filter by "A".

**Comments**

This is fixed by clearing the cache (Rails.cache.clear).  
So it seems that renaming a custom field doesn't invalidate a cache which it should invalidate.
