# Feature OP-16486 - Limit work package autocompleter to only match numbers from the beginning

Project: OpenProject
Status: specified
URL: https://community.openproject.org/work_packages/OP-16486

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Product Backlog |
| 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

**As** a user  
**I want to** only have work packages found that match the inserted value as a prefix or completely when typing into a work package autocompleter  
**so that** I no longer receive work packages that match inside the id.

**Acceptance criteria**

*   Work packages are only matched by the search string if
    
    *   the search string is the same as the id.
        
    *   the id starts with the search string.
        
*   Work packages are no longer matched if
    
    *   the search string is in the middle of the id.
        
    *   the search string is at the end of the id.
        
*   Applies to all work package autocompleters including
    
    *   Search
        
    *   Relation candidates
        
    *   Typeahead in a text field like wiki and work package description
        
    *   Parent
        

Examples

<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Search string</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Work package id</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Found</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">23</p></td><td class="op-uc-table--cell"><p class="op-uc-p">23</p></td><td class="op-uc-table--cell"><p class="op-uc-p">true</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">23</p></td><td class="op-uc-table--cell"><p class="op-uc-p">234</p></td><td class="op-uc-table--cell"><p class="op-uc-p">true</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">23</p></td><td class="op-uc-table--cell"><p class="op-uc-p">123</p></td><td class="op-uc-table--cell"><p class="op-uc-p">false</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">23</p></td><td class="op-uc-table--cell"><p class="op-uc-p">1234</p></td><td class="op-uc-table--cell"><p class="op-uc-p">false</p></td></tr></tbody></table></figure>
