# Epic OP-1803 - Define weekly work schedule (weekends)

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

## Detailed specification

### Motivation and background information

### Acceptance criteria

### Out of scope

| Attribute | Value |
| --- | --- |
| Mockups |  |

## Planning

| Attribute | Value |
| --- | --- |
| Roadmap |  |
| Date | 2022-05-04 – 2023-02-27 |
| Votes | 64 |
| List |  |
| Target versions | 12.3.0 |
| Sprint | 12.3.0 |
| Backlog bucket |  |
| Relevance |  |

## Subitems

| ID | Type | Subject | Status | Assignee | Target versions | Project | Priority | Spent time |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| OP-10205 | Implementation | GET non working days API | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10206 | Implementation | Non working days in datepicker | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10207 | Implementation | Non working days in calendar | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10363 | Implementation | "Include non working days" property for work package | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10498 | Implementation | Mark POST/PATCH/DELTE endpoints for days as not implemented in documentation | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10508 | Implementation | Non working days in Gantt charts | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10509 | Implementation | Non working days in team planner | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10552 | Implementation | Non working days in my-page spent time widget | closed |  | 12.2.0 | OpenProject | Medium |  |
| OP-10210 | Implementation | Non working days & duration in scheduling | closed |  | 12.3.0 | OpenProject | Medium |  |
| OP-10399 | Feature | Administration page for changing the global work schedule - Weekends only | closed |  | 12.3.0 | OpenProject | Medium |  |
| OP-10878 | Implementation | Journalling updates for work packages when non-working days settings change | closed |  | 12.3.0 | OpenProject | Medium |  |
| OP-11038 | Implementation | Journalizing toggling the ignore non working days property of a work package | closed |  | 12.3.0 | OpenProject | Medium |  |
| OP-11071 | Implementation | Mark ignoreNonWorkingDays as non writable for parent work packages | closed |  | 12.3.0 | OpenProject | Medium |  |
| OP-11072 | Implementation | Inherit ignoreNonWorkingDays up the ancestor chain | closed |  | 12.3.0 | OpenProject | Medium |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Module |
| --- | --- | --- | --- | --- | --- | --- |
| OP-10775 | Task | Non-working days: analyse requirements and develop UX concept | closed |  | 12.3.0 |  |

## Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Enterprise plan |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Niels Lindenthal |
| Accountable |  |
| Product manager |  |
| Designer | Parimal Satyal |
| Developers |  |
| Requested by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work | 0h · Σ 52d 1h |

## Description

# Implementation plan

This Epic will be implemented in stages parts:

  - **12.2**: User-definable non-working days (on the user settings page, date picker, team planner, calendar and GANTT view) are implemented but not visible. On the front-end, weekends are greyed out (cosmetically) as they are today but continue to remain selectable.
  - **12.3:** Weekends are now user-configurable via settings (<mention class="mention" data-id="42316" data-type="work_package" data-text="#42316">\#42316</mention>) and are properly reflected (with a grey background) in the date picker, team planner, calendar and GANTT view. Date picker has a toggle set titled *Working days* with two options "Work day" and "Include weekends".
      - "Include weekends" is selected by default for all existing work packages on migration.
      - "Work day" is default for all new work packages.

# Problem

  - It is currently difficult to create accurate project schedules when work packages span a weekend, since weekends are currently treated as normal/working days.
  - When projects change the start day of a work package, the calculation of the the finish date does not take into account any non-working days between the start and the finish date.

**Example:** A task starts on Monday and finishes on Friday. If the task is delayed by one day, the finish date is set for the Saturday. Since Saturday is generally a non-working day, the more accurate calculation in this case would be for the finish date to set to Monday.

# The Solution

An admin can define working days of the week, which applies to all projects in that instance.

  - There is a new entry called "Working days" in the admin settings.
      - This entry is specified in <mention class="mention" data-id="42316" data-type="work_package" data-text="#42316">\#42316</mention>.
  - Non-working days are represented visually in the front-end (calendar days are greyed out) in the following views:
      - Date picker (described in <mention class="mention" data-id="41341" data-type="work_package" data-text="#41341">\#41341</mention>)
      - Gantt view
      - Calendar
      - Team planner
  - The expected behavior when manipulating work packages in team planner, GANTT view and calendar are described here: <mention class="mention" data-id="42869" data-type="work_package" data-text="#42869">\#42869</mention>
  - Updates to journal entries/activity log are described in <mention class="mention" data-id="31992" data-type="work_package" data-text="#31992">\#31992</mention> under 'Activity log'.
  - **NOTE:** This work package handles the configuration and display of non-working days. Actual calculation and adaption of start/end dates and duration of work packages by taking into account these non-working days will be handled by the epic concerning Duration (<mention class="mention" data-id="31992" data-type="work_package" data-text="#31992">\#31992</mention>).

## Visuals

**Working days under administration settings**

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

# Visuals of affected views

**Date picker** (described in full in <mention class="mention" data-id="41341" data-type="work_package" data-text="#41341">\#41341</mention>)

<img class="op-uc-image op-uc-image_inline" style="width:480px;" src="/api/v3/attachments/37931/content">

**Gantt:**

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

**Calendar:**

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

**Team planner**

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

# **Out of Scope**

  - Selecting non-working days at a project level.
  - Non-working-days at an individual user-level.
  - Individual non-working days, e.g New Years Day (separate work package)
  - Subscribing to external calendars, e.g. Google calendars (that are not included in our libraries of region-based ics calendars, or uploaded manually).
  - Informing the user when they try to schedule a meeting on a non-working day.

# Figma link

<https://www.figma.com/file/SMzHAQWcY9k0PkTEKd5UQn/Duration-and-Non-Working-Days?node-id=0%3A1>
