# Bug JIM-224 - Import fails with unique constraint violation

Project: Stream Jira to OpenProject data Migrator
Status: closed
URL: https://community.openproject.org/work_packages/JIM-224

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Integrations / Jira |
| Target versions | 18.0.0 |
| Observed in versions |  |
| Sprint | Sprint 18.11.-24.11.2026 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | OP Dev Pro Team |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Do a Jira import for 20 projects
    

### What is the buggy behavior?

*   The import fails for 2 project with constraint violations, once when creating priorities, the other when creating status (based on error message)
    

### What is the expected behavior?

1.  The import should succeed
    
2.  If it fails the error message should tell me how to fix it / what the actual problem is
    

### **Logs**

```text
app/workers/import/jira_create_project_work_packages_job.rb:207:in 'Import::JiraCreateProjectWorkPackagesJob#create_priority'
app/workers/import/jira_create_project_work_packages_job.rb:100:in 'block (3 levels) in Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/workers/import/jira_create_project_work_packages_job.rb:94:in 'block (2 levels) in Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/models/journal/event_configuration.rb:63:in 'Journal::EventConfiguration.with_first'
app/models/journal/event_configuration.rb:46:in 'Journal::EventConfiguration.with'
app/workers/import/jira_create_project_work_packages_job.rb:93:in 'block in Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/models/journal/notification_configuration.rb:64:in 'Journal::NotificationConfiguration.with_first'
app/models/journal/notification_configuration.rb:47:in 'Journal::NotificationConfiguration.with'
app/workers/import/jira_create_project_work_packages_job.rb:92:in 'Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/workers/shared_job_setup.rb:59:in 'block in SharedJobSetup#prepare_job_context'
app/workers/shared_job_setup.rb:76:in 'SharedJobSetup#with_clean_request_store'
app/workers/shared_job_setup.rb:55:in 'SharedJobSetup#prepare_job_context'
```

```text
app/workers/import/jira_create_project_work_packages_job.rb:193:in 'Import::JiraCreateProjectWorkPackagesJob#create_status'
app/workers/import/jira_create_project_work_packages_job.rb:96:in 'block (3 levels) in Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/workers/import/jira_create_project_work_packages_job.rb:94:in 'block (2 levels) in Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/models/journal/event_configuration.rb:63:in 'Journal::EventConfiguration.with_first'
app/models/journal/event_configuration.rb:46:in 'Journal::EventConfiguration.with'
app/workers/import/jira_create_project_work_packages_job.rb:93:in 'block in Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/models/journal/notification_configuration.rb:64:in 'Journal::NotificationConfiguration.with_first'
app/models/journal/notification_configuration.rb:47:in 'Journal::NotificationConfiguration.with'
app/workers/import/jira_create_project_work_packages_job.rb:92:in 'Import::JiraCreateProjectWorkPackagesJob#each_iteration'
app/workers/shared_job_setup.rb:59:in 'block in SharedJobSetup#prepare_job_context'
app/workers/shared_job_setup.rb:76:in 'SharedJobSetup#with_clean_request_store'
app/workers/shared_job_setup.rb:55:in 'SharedJobSetup#prepare_job_context'
```

### Screenshots and other files

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/924693/content"></div></figure>

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/924694/content">

### Environment information

_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_

**OpenProject installation type**

*   Local docker-compose dev branch
    

**OpenProject version**

_If you&#x27;re not running on the cloud edition, please specify the version of OpenProject you&#x27;re running. Example: v12.1.5_

**Browser**

*   [ ] Chrome
*   [ ] Firefox
*   [ ] Safari
*   [ ] Mobile Safari
*   [x] DuckDuckGo

**Operating System**

*   [ ] Windows
*   [x] Mac OS X
*   [ ] Mobile iOS
*   [ ] Mobile Android
*   [ ] Linux (please specify distro)
*   [ ] Chrome OS
*   [ ] Other (please specify)

**Language**

English
