# Feature JIM-8 - Origin Key and Origin Internal ID for imported work packages 

Project: Stream Jira to OpenProject data Migrator
Status: review failed
URL: https://community.openproject.org/work_packages/JIM-8

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 18.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List | RM Jira exit |
| Roadmap | 2026 Q4 |
| Relevance | Optional — Nice-to-Have |

## OPEN POINTS / FEEDBACK

| ID | Subject | Status | Decision |
| --- | --- | --- | --- |
| JIM-10 | Do we actually get the internal database ID from the API? | resolved |  |

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Integrations / Jira |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan | Community (COM) |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Wieland Lindenthal |
| Product manager | Kristine Jetzke |
| Developers | OP Dev Pro Team |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by | Home (224196000003952096) |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

As an admin migrating projects/spaces from Jira to OpenProject,  
I want to keep references to the original Jira internal database ID per imported work package,  
so that I can have a clear and robust data mapping from which original Jira work item this work package is the continuation.

## Explanation

In Jira, work items such as issues and bugs have:

*   A **public-facing key** (e.g., `PROJ-123`) composed of a project/space identifier and an incrementing number. This key changes when work items are moved between spaces.
    
*   An **internal database ID** that never changes.
    

During import to OpenProject:

*   The **Jira key** is preserved as the OpenProject work package **identifier** (semantic ID), since OpenProject already supports semantic identifiers.
    
*   The **Jira internal database ID** is stored in the `origin_id` field for robust cross-reference.
    
*   The **Jira instance URL** is stored in `origin_host` to support imports from multiple Jira instances.
    
*   A **direct link** to the original Jira issue is stored in `origin_url`.
    

## Acceptance Criteria

*   Origin ID (`origin_id`) and Origin Host (`origin_host`) are set automatically during import and cannot be modified afterwards.
    
*   Duplicate Origin IDs are not allowed for the same Origin Host (unique constraint on `origin_host` + `origin_id`).
    
*   Origin information is visible in the work package detail view (shows source type and link to original issue).
    
*   The Jira issue key is preserved as the OpenProject work package identifier (no separate &quot;Origin Key&quot; field needed).
    
*   API responses include the Origin ID, Origin Host, Origin Source, and Origin URL as read-only fields.
    
*   Origin fields are set only by the system during import.
    

## Implementation Details

### Database Schema

<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><thead class="op-uc-table--head"><tr class="op-uc-table--row"><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Column</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Type</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Description</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">origin_source</code></p></td><td class="op-uc-table--cell"><p class="op-uc-p">string</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Source system identifier (e.g., <code class="op-uc-code">jira_data_center</code>)</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">origin_id</code></p></td><td class="op-uc-table--cell"><p class="op-uc-p">string</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Internal database ID from the source system</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">origin_host</code></p></td><td class="op-uc-table--cell"><p class="op-uc-p">string</p></td><td class="op-uc-table--cell"><p class="op-uc-p">URL of the source instance</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">origin_url</code></p></td><td class="op-uc-table--cell"><p class="op-uc-p">string</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Direct link to the original item</p></td></tr></tbody></table></figure>

### Indexes

*   Composite index on `(origin_source, origin_host, origin_id)` for query optimization
    
*   Unique constraint on `(origin_host, origin_id)` to prevent duplicates
    

## Translation Considerations

*   DE: Ursprungs-ID
