# Bug JIM-114 - Disabled priority fields breaks jira import

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 17.6.0 |
| Observed in versions | 17.5.0 |
| Sprint | Sprint 2 (within the cycle of 17.6) |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.5.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Pavel Balashou |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Jira side:
    
    1.  Hide priority field in a field configuration.
    
    2.  Check that priority is no longer displayed for issues in project that uses the field configuration.

2.  OpenProject side:
    
    1.  Try to migrate the project.
    
    2.  See the following error.
        
        <img class="image_resized op-uc-image op-uc-image_inline" style="width:213px;" src="/api/v3/attachments/922118/content">

### What is the buggy behavior?

  - If a field is hidden in a field configuration then it will be absent in the rest api.

### What is the expected behavior?

1.  Jira migrator does not fail and simply does not assign priority if it is not returned by the rest api.

### Error backtrace.

``` text
error on BAT project: undefined method '[]' for nil
E, [2026-06-16T15:32:44.008121 #7] ERROR -- : [ActiveJob] [Import::JiraFetchAndImportProjectsJob] [d1701eca-6334-4fc4-bb7f-ad54bad775bf] [Import::JiraImportProjectsJob] [d55b2e81-0724-4cf0-b2e3-f36110410251] Error performing Import::JiraImportProjectsJob (Job ID: d55b2e81-0724-4cf0-b2e3-f36110410251) from GoodJob(default) in 55766.64ms: NoMethodError (undefined method '[]' for nil):
app/workers/import/jira_import_projects_job.rb:241:in 'Import::JiraImportProjectsJob#import_priority'
app/workers/import/jira_import_projects_job.rb:146:in 'Import::JiraImportProjectsJob#import_issue'
app/workers/import/jira_import_projects_job.rb:71:in 'block (3 levels) in Import::JiraImportProjectsJob#perform'
app/workers/import/jira_import_projects_job.rb:70:in 'block (2 levels) in Import::JiraImportProjectsJob#perform'
app/workers/import/jira_import_projects_job.rb:67:in 'block in Import::JiraImportProjectsJob#perform'
app/workers/import/jira_import_projects_job.rb:62:in 'Import::JiraImportProjectsJob#perform'
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'
app/workers/import/jira_fetch_and_import_projects_job.rb:44:in 'block (2 levels) in Import::JiraFetchAndImportProjectsJob#perform'
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_fetch_and_import_projects_job.rb:42:in 'block in Import::JiraFetchAndImportProjectsJob#perform'
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_fetch_and_import_projects_job.rb:41:in 'Import::JiraFetchAndImportProjectsJob#perform'
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' 
```
