# Bug JIM-267 - Jira due date is automatically adjusted to the next working day on migration

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

## Open points

_No work packages_

## Details

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

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Alfonso Mancilla |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Login as a user with permissions to migrate
    
2.  Have a Jira issue with the due date on a Sunday
    
3.  Migrate the issue
    

### What is the buggy behavior?

*   The due date is moved to Monday
    
    e.g. _Saturday 31/12/2022 became Monday 02/01/2023_
    

### What is the expected behavior?

1.  The due date is not changed
    

### Technical notes

It&#x27;s controlled by the work package attribute `include_non_working_days`:

*   set to `false` -&gt; when setting a date and that date is a non-working day, the date will be moved forward until a working day is found
    
*   set to `true` -&gt; any date can be set, regardless of that date being a working day or not.
    

We could create work packages with the flag set if needed. With something like this:

```text
def non_working_date?(date)
  @working_days |= WorkPackages::Shared::WorkingDays.new
  !!(date && @working_days.non_working?(date))
end

def should_ignore_non_working_days?(jira_start_data, jira_due_data)
  non_working_date?(jira_start_data) || non_working_date?(jira_due_data)
end

... ignore_non_working_days: should_ignore_non_working_days?(..., ...) ...
```

Or just all work packages with the flag set to true.

### Environment information

**OpenProject installation type**

*   [x] All

**OpenProject version**

v17.9

**Operating System**

*   [x] All

**Language**

*   [x] All
