# Feature JIM-248 - Jira migrator should use Field Contexts to scope custom fields to projects

Project: Stream Jira to OpenProject data Migrator
Status: needs clarification
URL: https://community.openproject.org/work_packages/JIM-248

## Planning

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

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

_No work packages_

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

### Description

When migrating custom fields from Jira Data Center, the resulting OpenProject custom fields can be enabled for a broader set of projects than the Jira Field Context configuration allows.

Jira screens and Field Contexts serve different purposes:

\- Screens control where a field is displayed during issue creation, editing, and viewing.  
\- Field Contexts define the projects and issue types to which the custom field configuration applies.

The Jira Field Context should therefore be the source of truth when deciding in which OpenProject projects an imported custom field is enabled. Screen membership or the presence of historical values should not broaden that application scope.

### Environment

\- Jira Data Center: 10.3.20  
\- OpenProject installation: Docker Compose, on-premises  
\- OpenProject version: 17.9.0  
\- Migration: built-in Jira to OpenProject migrator

### Steps to reproduce

1\. In Jira, create or select a custom field.  
2\. Configure its Field Context so that it applies only to a limited set of projects and, optionally, issue types.  
3\. Add the field to screens that are shared by a broader set of projects, or retain historical values outside the current Field Context.  
4\. Migrate the affected projects to OpenProject.  
5\. Inspect the project associations of the migrated custom field in OpenProject.

### Actual behavior

The migrated custom field is enabled in projects outside the project scope configured in the Jira Field Context.

This makes the field appear applicable more broadly than it was in Jira and requires manual cleanup after the migration.

### Expected behavior

\- The migrator reads the Jira Field Contexts of each custom field.  
\- The resulting OpenProject custom field is enabled only for projects covered by those contexts.  
\- Jira issue-type restrictions are used when configuring the corresponding OpenProject work package types/forms, where the OpenProject model allows it.  
\- Screen configuration is treated as presentation/layout information and does not broaden field applicability.  
\- Historical values outside the current context are preserved or explicitly reported, but they do not silently expand the field&#x27;s configured scope.

### Additional context

In Jira Data Center, Field Context information is represented by the custom field configuration scheme and its project and issue-type scopes. The relevant database tables are &#x60;fieldconfigscheme&#x60;, &#x60;configurationcontext&#x60;, and &#x60;fieldconfigschemeissuetype&#x60;.
