# Feature OP-18074 - Autocompleter for available relation candidates should select necessary attributes from API

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 16.6.0 |
| Sprint | 16.6.0 |
| 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 | Modules and project features / Work packages, Modules and project features / Relations and scheduling |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Jan Sandbrink |
| 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** have the autocompleter for WP relation candidates indicate required attributes to the API,  
**so that** the API is able to generate autocompletion results faster.

**Acceptance criteria**

  - Usability of the autocompleter for adding a work package relation remains the same

**Technical notes**

  - The API request currently looks like `/api/v3/work_packages/:id/available_relation_candidates?type=relates&filters=some-filters&sortBy=some-sorting`
    
      - It should include a `select` parameter, that reduces the result to what's necessary to show the autocompleter
        
          - also see <https://www.openproject.org/docs/api/signaling/>
    
      - Specifically, the `total` should not not selected

**QA Notes**

It should be possible to test that work package autocompleters work no worse than before (e.g. show all relevant information for selectable work packages still). The core of the intended change can only be seen from the network tab: When entering something into the autocompleter, the network requests should include a "select" query parameter.
