# Feature COMMS-675 - Define database model for project-based work package identifiers

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

## Planning

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

## OPEN POINTS / FEEDBACK

| ID | Subject | Status | Decision |
| --- | --- | --- | --- |
| COMMS-676 | How will we create sequences? | decided | Keeping it simple: Each Project record contains a wp_identifier_counter. When creating a new WP, the code safely increases the counter and uses the new value to assign a sequence_number to the WP. This sequence number is the further used to construct the semantic identifier. |
| COMMS-677 | How will we store & query project-based work package IDs? | decided | Go with the "registry table" approach -- any time a semantic identifier is assigned to a WP, it also gets written to a new table which maps identifiers to WP records. This enables efficient querying and ensures the identifiers are stable through time even for edge cases. |
| COMMS-678 | How will we find work packages? | decided | Overwrite `.find` so other developers don't have to know about different finding strategies and can keep using the "known" finder method |
| COMMS-692 | How do we ensure manual changes to the work package identifier don't "break" the WorkPackageSemanticAliases registry? | decided | Use validation context to disallow changes "on default" |
| COMMS-693 | How to decide which ID for work packages is shown in the frontend? | decided | We start with option A (method returns value based on the setting) and if that's not performant enough, we can add caching or switch to option B (separate column) |

## Use cases

_No work packages_

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| COMMS-679 | POC: Explore friendly ID backed historical and finder methods for project based work package identifiers | Implementation | closed | Kabiru Mwenja | 17.4.0 |  |
| COMMS-680 | POC: Explore compute on read finder methods for project based work package identifiers | Implementation | closed | Kabiru Mwenja | 17.4.0 |  |
| COMMS-681 | POC: Explore Identifier registry for project based work package identifiers | Implementation | closed | Tom Hykel | 17.4.0 |  |
| COMMS-683 | Implement WorkPackage semantic ID allocation system | Implementation | closed | Tom Hykel | 17.4.0 |  |
| COMMS-686 | Improve performance of bulk WP operations in semantic mode | Implementation | closed |  | 17.4.0 |  |
| COMMS-687 | Add WP validator to ensure setting identifier + semantic number at the same time | Implementation | closed | Kabiru Mwenja | 17.4.0 |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| COMMS-691 | Code maintenance | Change namespace for IdentifierAutofix classes | closed |  | 17.4.0 |  |  |

## 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

**Acceptance criteria**

*   We store the new project-based work package identifiers
    
*   Implementation should consider performance, since they will be read often
    

**Technical notes**

*   <br>
    

**Out of scope**

*   <br>
    

_Set the_ **To be informed/consulted teams** _field to include all teams necessary to be informed of the changes._
