# Bug OP-16461 - Missing debounce when searching for work packages in relations tab

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

## Open points

_No work packages_

## Details

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

### Steps to reproduce

1.  Go to a work package's relations tab

2.  
    
    <br>

3.  Create a new relation

4.  Search for a work package

5.  Enter a word

### What is the buggy behavior?

  - Each letter of the word will create a available\_relation\_candidates request immediately, creating many requests for a single search

  - On large installations this adds extra stress to the database, slowing everything down

### What is the expected behavior?

  - There should be a bit of a debounce
    
      - meaning that the search should only be triggered after a short delay once the user stopped typing
    
      - this way not every letter of every word causes a new search

### Screenshots and other files

Demo:

  - Searching for the word 'hallo' creates 5+ queries, one for each letter

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

Server logs for similar query:

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

**OpenProject version**

*v14.6.3* (this is still the case in 15.1.1)
