# Feature OP-10876 - Update team planner and calendar for duration and non-working days

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-10876

## Planning

| Attribute | Value |
| --- | --- |
| Date | 2022-04-27 – 2022-09-23 |
| Priority | Medium |
| Target versions | 12.3.0 |
| Sprint | 12.3.0 |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_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 |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Behrokh Satarnejad |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

### Acceptance criteria

#### Basic - Copied from <mention class="mention" data-id="31992" data-type="work_package" data-text="#31992">\#31992</mention>

  - For work packages without start/finish dates but *with* duration:
      - they are not visible until a date is specified
          - (they can of course be accessed using the "Add Existing" function in the team planner)
          - the width of a card that is dragged onto the team planner (from the left-hand "Add Existing" panel, for example) is relative to the total duration of that work package (within the limits of the viewport, of course).
      - Once dragged, the start date is set and therefore the finish date is also derived.
  - If the user modifies a work package via the drag handles on the left/right edges of the cards on the Team planner, both the start/finish date as well as the duration are altered in lockstep.

#### Additional

**Work packages spanning non-working days**

  - Cards will span over a non-working days:
      - If non-working days are enabled (via the date picker), a 3-day work package from Thursday will span Thursday to Saturday *(assuming Sat/Sun non-working).*
      - If non-working days are not-enabled (via the date picker), 3-day work package from Thursday will span Thursday to Monday *(assuming Sat/Sun non-working).*
  - Cards themselves will **not** indicate whether non-working days are included or not.
  - Automatically scheduled work packages whose dates are derived should be blocked from dragging (as is the case currently on the GANTT view for parent work packages).

**Creating new cards by clicking/selecting dates**

  - When clicking on a single date that is a non-working day
      - the work package will be scheduled for that day and
      - "Include non-working days" will be enabled in the date picker
  - Selecting a range of days that includes a non-working day, but such as start/finish dates are not non-working
      - the work package will be scheduled for that date range
      - "Include non-working days" will *not* be enabled in the date picker
  - Selecting a range of days such that start/finish dates are non-working
      - the work package will be scheduled for that date range
      - "Include non-working days" will be enabled in the date picker
  - Clicking a day or selecting a range of days that *does not* include non-working days
      - The work package will be scheduled on the selected days
      - "Include non-working days" will *not* be enabled in the date picker

**Dragging or resizing an existing work package**

  - Moving a regular work package ("working days only" is ON):
      - Displays non-working days in red indicating that they are blocked (similar to the permission-based blocking)
      - Dropping to a non-working **start date** is not possible. Doing so will cancel the request and display and error message:
          - "This work package cannot start/finish on a non-working day."
          - *Note that it should be possible to drag such that the finish date is a non-working day; in this case, the work package will simply extend to skip over the non-working days, to maintain duration.*
          - To move this card to a non-working start date, the user has to open the date picker and select "Include non-working days"
  - Resizing a card such that its start or end date is a non-working day is not possible (since resizing changes either start date on the left, or the finish date on the right).
      - This will cancel the change and display an error message:
          - "This work package cannot start/finish on a non-working day."
  - Moving a card such that it spans non-working days *is* possible.
      - The start date is the newly selected start date.
      - The finish date is adjusted to maintain duration (by skipping non-working days).
      - This is possible even if the finish date is a non-working day; on drop, the work package will extend to a working day. 
          - *For example, if a 5 day work package starting Monday is dragged to start on Tuesday, dropping it there is possible even if the finish date is initially on a Sunday. On drop, the real finish date will be calculated to Monday, skipping the weekends.*

**Dragging or resizing a work package that includes non-working days**

  - There are no limitations for manually scheduled work package
