# Feature COMMS-697 - Expose project-based semantic work package identifier on the API

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-697

## Planning

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

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| COMMS-733 | Stale Work Package displayId after switching to semantic identifier mode | Implementation | closed |  | 17.5.0 |  |

## 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 |  |
| 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 of the API  
**I want to** see the project-based semantic work package identifier and the user-facing identifier in the API  
**so that** I can use the values if I like

**Acceptance criteria**

  - the endpoints for getting work packages in the API v3 expose the `display_id` (based on the `Setting::WorkPackageIdentifier` either database ID or semantic ID), see <mention class="mention" data-id="73715" data-type="work_package" data-text="#73715">\#73715</mention> for implementation details)

**Technical notes**

  - We should not expose the `identifier` or `sequence_number` on the API
    
      - In case the WorkPackageIdentifier Setting was set to `semantic` and then back to `classic`, and a work package is then moved from project A to project B, it's identifier will not be updated any more and still reference project A. Same for the sequence number.

  - `display_id` should be a method of `WorkPackage` (and be called in the representer) since we also need it in views.

**Permissions and visibility considerations**

  - Visibility of work packages does not change

**Translation considerations**

  - No translations needed for the API

**Release communication**

  - Dear community developers, in the next release (17.5) we will allow OpenProject to have work package identifiers that carry meaning by consisting a short project identifier and a per project sequence-number, eg \`\#ABC-123\`. Many people that have worked with Jira are familiar with that pattern.

  - If you are building or maintaining an app that consumes the OpenProject API V3 please start using the work package field `displayId` instead of `id` whenever displaying the identifier. Then, once 17.5 is released, your application will not need to know in what mode the OpenProject instance is configured. `displayId` will always show the right one.

  - The `id` field will continue to have the database ID. And for API requests you should keep using that one, e.g. for filtering etc.

<br>
