Content
View differences
Updated by Parimal Satyal about 4 years ago
**As** an OpenProject user
**I want** to calculate the work package start and end dates based on the duration
**so** that I only have to set the duration.
# **Acceptance criteria:**
The duration feature affects a range of views and modules:
### Work package attributes and date picker
* In the date picker modal there is a text field `duration`.
* When the user enters a duration, the dates are derived.
* The contrary is also true: when a user enters dates, the duration is derived.
* More precise scenarios for what is derived/calculated as a result of what input (in which order), are [presented below](https://community.openproject.org/#scenarios).
* The duration represents the amount of days between the start and the finish date (inclusive):
* Monday to Tuesday: 2 days
* Monday to Monday (same day): 1 day
* Once configuring non-working days is implemented (<mention class="mention" data-id="18416" data-type="work_package" data-text="#18416">#18416</mention>), these non-working days are _skipped_ _over_ and do not count towards the total duration:
* Friday to Monday: 2 days _(Saturday and Sunday are skipped over)_
* **\[open\]** The user is able to override configured non-working days per work package; this means non-working can be optionally included, in which case they are _not_ skipped and count towards the date and duration count.
* **\[open\]** This requires manual scheduling to be checked (to be explored)
* In all cases, the duration is consistent with the start and the finish date. Updating dates will update duration, and updating duration will update dates.
* It will not possible, for example, to specify a duration of 8 days for a task that starts and finishes the same week.
* The duration as well as start and due dates can not be configured via the form configuration. They are always present at the same place within the work package show page and form.
* Work packages have an empty (not set) default duration.
* Setting start _and_ end dates automatically sets duration.
* Setting only one of the dates does not automatically set duration (unable to derive). derive)
* Setting only of the dates and duration derives the other date.
* It is possible to have _only **\[open\]** Duration, once set, cannot be removed unless at least one attribute_ (only start date, only finish date or only duration) or all three. It is not possible to have just two (since of the third will be derived from the other two). Concretely:
* Duration specified; no start date; no finish dates (start/finish) is possible.
* A start date specified; no finish date; no also removed; else, duration is possible.
* A finish date specified; no start date; no duration is possible
but...
* A start date specified; duration specified; no end date is _not possible_. (End date is derived)
* A finish date specified; duration specified; no start date is _not possible_. (Start date is derived)
* A duration specified, start date specified, no finish date is _not possible_. (End date is derived)
* A duration specified, finish date specified, no start date is _not possible_. (Start datedate is derived). derived (as described above)
* Milestone-typed work packages don't have a duration field. field.
* **\[open\]** On the GANNT and Team planner, they represent 1 day.
* The user has to to be informed when:
* Dates are automatically derived from relations (notably from parents or children),
* **\[open\]** The user must be given a way to view relations (a link to a GANTT view?)
* these automatically derived dates can not be modified, _unless:_
* Manual scheduling is enabled, and thus relations are ignored and
* Configured non-working days maybe optionally included in the calculation of total duration and start/end dates.
### Work package table view
* In the work packages list there is a column "duration". When clicking on this the date modal with the date picker is opened.
* **\[open\]** With the focus on the duration field.
* Filtering by duration is possible
* Sorting by duration is possible
### GANTT chart
* For work packages without start/finish dates but _with_ duration, the width of a "strip" representing such a work package has a width that is relative to its total duration when dragging to the the GANTT chart.
* "Relative" because width depends on the zoom level of the GANTT chart.
* If the user modifies a work package via the drag handles on the left/right edges of the strips the in Gantt chart, both the start/finish date as well as the duration are altered in lockstep.
### Team planner
* For work packages without start/finish dates but _with_ duration, 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.
* "Relative" because width depends on the zoom level/view of the team planner calendar.
* 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.
* **\[open\]** The user is able to modify the view such that non-workin days are not displayed on the team planner.
* Even when non-working days are not displayed, they are nevertheless represented (although with much narrower column widths and without a header). header).
* This is especially important because manual scheduling nevertheless allows users to include non-working days into the date and duration count.
# Open
* Visuals for the rework of the dates & duration to be a fixed (not configurable) part of the work package show page and form (<mention class="mention" data-id="40539" data-type="work_package" data-text="#40539">#40539</mention>)
* Inheritance of the duration between a work package and its children
* e.g. can a work package have a duration that is less than the duration of its child
# Visuals needed
* Date picker with duration field
* Warning/Information when dates are derived from relations
* Warning/information about manual scheduling
* Option to include configured non-working days
* Work package table view with duration column
* GANTT view
* Team planner
* with option to switch on and off the display of non-working days in week/2-week view
# Scenarios
## Scenario 1:
* Setup
* Start date: Monday, February 8, 8 2021
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is set changed to Friday, February 19 2021 (derived)
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28335/content"></div></figure>
## Scenario 2
* Setup
* Start date: empty
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* No date is added
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28336/content"></div></figure>
## Scenario 3
* Setup
* Start date: empty
* Finish date: Friday, February 19, 2021
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* The start date is set changed to Monday, February 8, 2021 (derived)
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28337/content"></div></figure>
## Scenario 4
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Friday, February 19, 2021
* Duration: 10
* Change
* User changes enters a duration to of 11 days
* Expected result:
* The finish date is changed to Monday, February, 22 2021
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28338/content"></div></figure>
## Scenario 5
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Monday, February 22, 2021
* Duration: 11
* Change
* User changes enters a duration to of 10 days
* Expected result:
* The finish date is changed to Friday, February, 19, 2021
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28339/content"></div></figure>
## Scenario 6
* Setup
* Start date: Tuesday, February 9, 2021 Two work packages
* Finish date: Friday, February 12, 2021 Task 1: Monday - Tuesday
* Task 2: no dates, no duration
* Change
* Remove duration. Task 2 follows Task 1
* Expected result
* Task 2: Starts Wednesday, Finish date is also removed, start date is maintained as is. Date Wednesday, Duration = 1
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28340/content"></div></figure>
## Scenario 7
* Setup
* Start date: Monday, February 8, 9, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 4 3
* Change
* User alters the start date to Tuesday, February 9, Tuesday 10, 2021
* Expected result
* **\[behaviour updated\]** Finish date is maintained, duration is automatically adjusted changed to 3 days (derived; logic = changing date affects duration) Thursday, Feb 12, 2021
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28341/content"></div></figure>
## Scenario 8
* Setup
* Start date: Tuesday, February 9, 10, 2021
* Finish date: Friday, Thursday, February 12, 2021
* Duration: 4 3
* Change
* User alters the finish date to Feb 11, 2021. 2021
* Expected result
* **\[behaviour updated\]** Start date is unaffected, duration is now set changed to 3 days (derived from dates).
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28342/content"></div></figure>
## Scenario 9
* Setup
* Start date: empty
* Finish date: empty
* Duration: 4
* Change
* User enters the finish date of Friday, February 12, 2021.
* Expected result
* The start date is set to Tuesday, February Monday, Feb 9, 2021 (derived from duration).
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28343/content"></div></figure>
## Scenario 10 9
* Setup
* Start date: empty
* Finish date: Thursday, February 11, 2021
* Duration: empty
* Change
* User enters the start date of Tuesday, February 09, 2021
* Expected result
* Duration is set to 3 (derived from start date)
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28344/content"></div></figure>
## Scenario 11
* Setup
* Two work packages
* Task 1:
* Start date: Monday, 15 February, 2021
* End date: Wednesday, 17 February, 2021
* Duration: 3
* Task 2:
* Start date: empty
* End date: empty
* Change
* Change relations such that Task 2 preceeds Task 1.
* Expected result
* Dates for Task 2 are derived from this "proceeds" relation.
* Start date: Friday, 12 February, 2021 (dates including and after the work package this one preceedes are blocked)
* Duration: 1 (automatic)
* End date: Friday, 12 February, 2021 (derived from duration)
* Warning: Reminder the start and end dates need to be before the dates of the work package this one is preceeding. Invalid dates are disabled.
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28347/content"></div></figure>
## Scenario 12
* Setup
* Two work packages
* Task 1:
* Start date: Monday, 8 February, 2021
* End date: Wednesday, 10 February, 2021
* Duration: 3
* Task 2:
* Start date: empty
* End date: empty
* Change
* Change relations such that Task 2 follows Task 1.
* Expected result
* Dates for Task 2 are derived from this "follows" relation.
* Start date: Thursday, 11 February, 2021
* Duration: 1 (automatic)
* End date: Thursday, 11 February, 2021 (derived from duration)
* Warning: Reminder the start and end dates need to be after the work package this one following. Invalid dates are disabled.
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28348/content"></div></figure>
## Scenario 13
* Setup
* Two work packages
* Task 1:
* Start date: Monday, 8 February, 2021
* End date: Wednesday, 10 February, 2021
* Duration: 3
* Task 2:
* Start date: empty
* End date: empty
* Change
* Change relations such that Task 2 is a child of Task 1.
* Expected result
* Dates and duration for Task 2 are derived from the parent.
* Start date: Monday, 8 February, 2021
* End date: Wednesday, 10 February, 2021
* Duration: 3
* Information: Reminder that this work package is now automatically scheduled, and that start and end dates are derived. The dates are not modifiable (unless manual scheduling is selected, which will ignore relations).
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28349/content"></div></figure>
## Scenario 14
* Setup
* Start date: Monday, February 9, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 3
* Change
* The user User moves the drag handle on the left border (start date) of the box representing the work package in Gantt chart and Team planner one day to the right (to Feb 10, 2021)
* Expected result
* The duration is reduced to 2. The start date is set to Feb 10, 2021. The finish Finish date is left unchanged.
_(Visual will be added when ready)_
## Scenario 15 10
* Setup
* Start date: Monday, February 9, 2021 empty
* Finish date: Wednesday, February 11, 2021
* Duration: 3 empty
* Change
* The user moves User enters the work package by dragging it to the right so start date is Wednesday, Feb 11, 2021. of Monday, February 09, 2021
* Expected result
* The duration **\[open\]** Duration is maintained. Start state is now Wednesday, Febuary 11, 2021 (as set by drag), end date is set to Friday, February 13 (derived based on duration).
_(Visual will be added when ready)_ 3
# Visuals
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/27172/content"></div></figure>
# Seed Data
**Static queries in section "Default data":**
* Gantt chart: Add duration column after column finish date:
**Queries in section favorite views**
* Project plan (Query ID 1): Add duration column after column finish date
* Project plan (Query ID 14): Add duration column after column finish date
# Full screen view
* Currently the status selection is below the subject at the same position for all work package types.
* We also move the dates and the curation to this area (visuals tbd).
* For milestones there is no duration by definition.
# Out-of-Scope
* Consider weekends and holidays (for this ticket, will normally already have been dealth by <mention class="mention" data-id="18416" data-type="work_package" data-text="#18416">#18416</mention>)
* Summing duration _(need clarification)_
* Grouping by durations _(need clarification)_
# Implementation notes
* Frontend:
* include duration in date picker
* There is no duration form field for milestones.
* Restyling dates section (start & due date & duration) so that dates are always visible (no longer configurable via form configuration) similar to status
* Adapt specs that break by doing this
* Display longer bar in gantt chart and planning board while dragging a work package without start & end dates
* Backend:
* Introduce into data layer & contracts
* Disallow setting duration for milestone typed work packages
* Services
* **Open** inheritance within hierarchy
* Include in API
* Exclude for milestone typed work packages (should be covered by non writable property in contract)
* Calculates start/end dates on scheduling and on setting duration/start/end-dates
* Filter for duration ("Everything longer than")
* Sort
* Seeding and default configurations
* Migration for removing the dates from existing form configurations as they can no longer be configured.
* Migration for setting a duration for all work packages having start and end date set.
**I want** to calculate the work package start and end dates based on the duration
**so** that I only have to set the duration.
# **Acceptance criteria:**
The duration feature affects a range of views and modules:
### Work package attributes and date picker
* In the date picker modal there is a text field `duration`.
* When the user enters a duration, the dates are derived.
* The contrary is also true: when a user enters dates, the duration is derived.
* More precise scenarios for what is derived/calculated as a result of what input (in which order), are [presented below](https://community.openproject.org/#scenarios).
* The duration represents the amount of days between the start and the finish date (inclusive):
* Monday to Tuesday: 2 days
* Monday to Monday (same day): 1 day
* Once configuring non-working days is implemented (<mention class="mention" data-id="18416" data-type="work_package" data-text="#18416">#18416</mention>), these non-working days are _skipped_ _over_ and do not count towards the total duration:
* Friday to Monday: 2 days _(Saturday and Sunday are skipped over)_
* **\[open\]** The user is able to override configured non-working days per work package; this means non-working can be optionally included, in which case they are _not_ skipped and count towards the date and duration count.
* **\[open\]** This requires manual scheduling to be checked (to be explored)
* In all cases, the duration is consistent with the start and the finish date. Updating dates will update duration, and updating duration will update dates.
* It will not possible, for example, to specify a duration of 8 days for a task that starts and finishes the same week.
* The duration as well as start and due dates can not be configured via the form configuration. They are always present at the same place within the work package show page and form.
* Work packages have an empty (not set) default duration.
* Setting start _and_ end dates automatically sets duration.
* Setting only one of the dates does not automatically set duration (unable to derive).
* Setting only of the dates and duration derives the other date.
* Duration specified; no start date; no finish dates
* A start date specified; no finish date; no
* A finish date specified; no start date; no duration is possible
but...
* A start date specified; duration specified; no end date is _not possible_. (End date is derived)
* A finish date specified; duration specified; no start date is _not possible_. (Start date is derived)
* A duration specified, start date specified, no finish date is _not possible_. (End date is derived)
* A duration specified, finish date specified, no start date is _not possible_. (Start datedate is derived).
* Milestone-typed work packages don't have a duration field.
* **\[open\]** On the GANNT and Team planner, they represent 1 day.
* The user has to to be informed when:
* Dates are automatically derived from relations (notably from parents or children),
* **\[open\]** The user must be given a way to view relations (a link to a GANTT view?)
* these automatically derived dates can not be modified, _unless:_
* Manual scheduling is enabled, and thus relations are ignored and
* Configured non-working days maybe optionally included in the calculation of total duration and start/end dates.
### Work package table view
* In the work packages list there is a column "duration". When clicking on this the date modal with the date picker is opened.
* **\[open\]** With the focus on the duration field.
* Filtering by duration is possible
* Sorting by duration is possible
### GANTT chart
* For work packages without start/finish dates but _with_ duration, the width of a "strip" representing such a work package has a width that is relative to its total duration when dragging to the the GANTT chart.
* "Relative" because width depends on the zoom level of the GANTT chart.
* If the user modifies a work package via the drag handles on the left/right edges of the strips the in Gantt chart, both the start/finish date as well as the duration are altered in lockstep.
### Team planner
* For work packages without start/finish dates but _with_ duration, 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.
* "Relative" because width depends on the zoom level/view of the team planner calendar.
* 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.
* **\[open\]** The user is able to modify the view such that non-workin days are not displayed on the team planner.
* Even when non-working days are not displayed, they are nevertheless represented (although with much narrower column widths and without a header).
* This is especially important because manual scheduling nevertheless allows users to include non-working days into the date and duration count.
# Open
* Visuals for the rework of the dates & duration to be a fixed (not configurable) part of the work package show page and form (<mention class="mention" data-id="40539" data-type="work_package" data-text="#40539">#40539</mention>)
* Inheritance of the duration between a work package and its children
* e.g. can a work package have a duration that is less than the duration of its child
# Visuals needed
* Date picker with duration field
* Warning/Information when dates are derived from relations
* Warning/information about manual scheduling
* Option to include configured non-working days
* Work package table view with duration column
* GANTT view
* Team planner
* with option to switch on and off the display of non-working days in week/2-week view
# Scenarios
## Scenario 1:
* Setup
* Start date: Monday, February 8,
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is set
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28335/content"></div></figure>
## Scenario 2
* Setup
* Start date: empty
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* No date is added
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28336/content"></div></figure>
## Scenario 3
* Setup
* Start date: empty
* Finish date: Friday, February 19, 2021
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* The start date is set
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28337/content"></div></figure>
## Scenario 4
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Friday, February 19, 2021
* Duration: 10
* Change
* User changes
* Expected result:
* The finish date is changed to Monday, February, 22 2021
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28338/content"></div></figure>
## Scenario 5
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Monday, February 22, 2021
* Duration: 11
* Change
* User changes
* Expected result:
* The finish date is changed to Friday, February, 19, 2021
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28339/content"></div></figure>
## Scenario 6
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Friday, February 12, 2021
* Task 2: no dates, no duration
* Change
* Remove duration.
* Expected result
*
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28340/content"></div></figure>
## Scenario 7
* Setup
* Start date: Monday, February 8,
* Finish date: Wednesday, February 11, 2021
* Duration: 4
* Change
* User alters the start date to Tuesday, February 9,
* Expected result
* **\[behaviour updated\]** Finish date is maintained, duration is automatically adjusted
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28341/content"></div></figure>
## Scenario 8
* Setup
* Start date: Tuesday, February 9,
* Finish date: Friday,
* Duration: 4
* Change
* User alters the finish date to Feb 11, 2021.
* Expected result
* **\[behaviour updated\]** Start date is unaffected, duration is now set
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28342/content"></div></figure>
## Scenario 9
* Setup
* Start date: empty
* Finish date: empty
* Duration: 4
* Change
* User enters the finish date of Friday, February 12, 2021.
* Expected result
* The start date is set to Tuesday, February
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28343/content"></div></figure>
## Scenario 10
* Setup
* Start date: empty
* Finish date: Thursday, February 11, 2021
* Duration: empty
* Change
* User enters the start date of Tuesday, February 09, 2021
* Expected result
* Duration is set to 3 (derived from start date)
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28344/content"></div></figure>
## Scenario 11
* Setup
* Two work packages
* Task 1:
* Start date: Monday, 15 February, 2021
* End date: Wednesday, 17 February, 2021
* Duration: 3
* Task 2:
* Start date: empty
* End date: empty
* Change
* Change relations such that Task 2 preceeds Task 1.
* Expected result
* Dates for Task 2 are derived from this "proceeds" relation.
* Start date: Friday, 12 February, 2021 (dates including and after the work package this one preceedes are blocked)
* Duration: 1 (automatic)
* End date: Friday, 12 February, 2021 (derived from duration)
* Warning: Reminder the start and end dates need to be before the dates of the work package this one is preceeding. Invalid dates are disabled.
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28347/content"></div></figure>
## Scenario 12
* Setup
* Two work packages
* Task 1:
* Start date: Monday, 8 February, 2021
* End date: Wednesday, 10 February, 2021
* Duration: 3
* Task 2:
* Start date: empty
* End date: empty
* Change
* Change relations such that Task 2 follows Task 1.
* Expected result
* Dates for Task 2 are derived from this "follows" relation.
* Start date: Thursday, 11 February, 2021
* Duration: 1 (automatic)
* End date: Thursday, 11 February, 2021 (derived from duration)
* Warning: Reminder the start and end dates need to be after the work package this one following. Invalid dates are disabled.
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28348/content"></div></figure>
## Scenario 13
* Setup
* Two work packages
* Task 1:
* Start date: Monday, 8 February, 2021
* End date: Wednesday, 10 February, 2021
* Duration: 3
* Task 2:
* Start date: empty
* End date: empty
* Change
* Change relations such that Task 2 is a child of Task 1.
* Expected result
* Dates and duration for Task 2 are derived from the parent.
* Start date: Monday, 8 February, 2021
* End date: Wednesday, 10 February, 2021
* Duration: 3
* Information: Reminder that this work package is now automatically scheduled, and that start and end dates are derived. The dates are not modifiable (unless manual scheduling is selected, which will ignore relations).
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/28349/content"></div></figure>
## Scenario 14
* Setup
* Start date: Monday, February 9, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 3
* Change
* The user
* Expected result
* The duration is reduced to 2. The start date is set to Feb 10, 2021. The finish
_(Visual will be added when ready)_
## Scenario 15
* Setup
* Start date: Monday, February 9, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 3
* Change
* The user moves
* Expected result
* The duration
_(Visual will be added when ready)_
# Visuals
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/27172/content"></div></figure>
# Seed Data
**Static queries in section "Default data":**
* Gantt chart: Add duration column after column finish date:
**Queries in section favorite views**
* Project plan (Query ID 1): Add duration column after column finish date
* Project plan (Query ID 14): Add duration column after column finish date
# Full screen view
* Currently the status selection is below the subject at the same position for all work package types.
* We also move the dates and the curation to this area (visuals tbd).
* For milestones there is no duration by definition.
# Out-of-Scope
* Consider weekends and holidays (for this ticket, will normally already have been dealth by <mention class="mention" data-id="18416" data-type="work_package" data-text="#18416">#18416</mention>)
* Summing duration _(need clarification)_
* Grouping by durations _(need clarification)_
# Implementation notes
* Frontend:
* include duration in date picker
* There is no duration form field for milestones.
* Restyling dates section (start & due date & duration) so that dates are always visible (no longer configurable via form configuration) similar to status
* Adapt specs that break by doing this
* Display longer bar in gantt chart and planning board while dragging a work package without start & end dates
* Backend:
* Introduce into data layer & contracts
* Disallow setting duration for milestone typed work packages
* Services
* **Open** inheritance within hierarchy
* Include in API
* Exclude for milestone typed work packages (should be covered by non writable property in contract)
* Calculates start/end dates on scheduling and on setting duration/start/end-dates
* Filter for duration ("Everything longer than")
* Sort
* Seeding and default configurations
* Migration for removing the dates from existing form configurations as they can no longer be configured.
* Migration for setting a duration for all work packages having start and end date set.