# Feature OP-11397 - "Contains" filter for attachment file name should find sub-strings, too

Project: OpenProject
Status: in specification
URL: https://community.openproject.org/work_packages/OP-11397

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

This was posted as a BUG but it actually is a missing FEATURE, asking for sub-string search on attachment file names. With such a sub-string search one could search for strings like ".jpg" to search for all JPEG images. Also, we might need to consider to differentiate different "contains" operators to be clearly sub-string or term based search, so that users know what to expect.

The original BUG report was:

### Steps to reproduce

1.  Open list with tasks that have files attached.
2.  Go to a task with attached file(s); open info panel, then "Files"
3.  Open filter settings, remove all existing filters; create new filter: "Name of attached file" - "Contains" - $any letter contained in the files you see in the *Files* tab
4.  Task list is filtered, but without showing any results.  --\> see screenshot attached

### What is the buggy behavior?

  - Filter doesn't work as expected.

### What is the expected behavior?

  - Task list should show all tasks, that match the filter: e.g. "Name of attached file" - "Contains" - "." should basically create a list of all tasks, that have attached files of any type.

### Screenshots and other files

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/attachments/40630/Screenshot_Bug_file_filter.jpg"></div></figure>

### Environment information

**OpenProject installation type**

- [x] Hosted cloud edition
- [ ] Packaged installation
    - What distribution?
- [ ] Docker All-in-one container
- [ ] Docker-compose installation
- [ ] Other (please specify)

**Browser**

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

**Language**

Browser and OpenProject language: German
