Content
View differences
Updated by Jens Ulferts almost 5 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:**
* In the date picker modal there is a an form field `duration`.
* When entering a duration the dates are derived
* In the work packages list there is a column "duration". When clicking on this the date modal with the date picker is opened.
* In all cases the duration is consistent with the start and the finish date. It is not possible to create a duration of 8 days for a task that starts and finishs in the same week.
* The bar representing a work package has a width according to the work package's duration (if defined) while dragging a work package without start and end dates for placement on the gantt chart and planning board
* Filtering by duration is possible
* Sorting by duration is possible
* 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
* Milestone typed work packages don't have a duration field
# Open
* Visuals for the rework of the dates & duration to be a fixed (not configurable) part of the work package show page and form
* 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
# Examples
## Scenario 1:
* Setup
* Start date: Monday, February 8 2021
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is changed to Friday, February 19 2021
## 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
## 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 changed to Monday, February 8, 2021
## Scenario 4
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Friday, February 19, 2021
* Duration: 10
* Change
* User enters a duration of 11 days
* Expected result:
* The finish date is changed to Monday, February, 22 2021
## Scenario 5
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Monday, February 22, 2021
* Duration: 11
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is changed to Friday, February, 19, 2021
# Scenario 6
* Setup
* Two work packages workpackages
* Task 1: Monday - Tuesday
* Task 2: no dates, no duration
* Change
* Task 2 follows Task 1
* Expected result
* Task 2: Starts Wednesday, Finish Date Wednesday, Duration = 1
# Visuals
<figure class="image op-uc-figure" style="width:55.55%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20507/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 (##18416)
* Summing durations
* Grouping by durations
# Implementation notes
* Frontend:
* include duration in date picker
* Hide the duration if the work package has a milestone task
* 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:**
* In the date picker modal there is a
* When entering a duration the dates are derived
* In the work packages list there is a column "duration". When clicking on this the date modal with the date picker is opened.
* In all cases the duration is consistent with the start and the finish date. It is not possible to create a duration of 8 days for a task that starts and finishs in the same week.
* The bar representing a work package has a width according to the work package's duration (if defined) while dragging a work package without start and end dates for placement on the gantt chart and planning board
* Filtering by duration is possible
* Sorting by duration is possible
* 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
* Milestone typed work packages don't have a duration field
# Open
* Visuals for the rework of the dates & duration to be a fixed (not configurable) part of the work package show page and form
* 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
# Examples
## Scenario 1:
* Setup
* Start date: Monday, February 8 2021
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is changed to Friday, February 19 2021
## 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
## 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 changed to Monday, February 8, 2021
## Scenario 4
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Friday, February 19, 2021
* Duration: 10
* Change
* User enters a duration of 11 days
* Expected result:
* The finish date is changed to Monday, February, 22 2021
## Scenario 5
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Monday, February 22, 2021
* Duration: 11
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is changed to Friday, February, 19, 2021
# Scenario 6
* Setup
* Two work packages
* Task 1: Monday - Tuesday
* Task 2: no dates, no duration
* Change
* Task 2 follows Task 1
* Expected result
* Task 2: Starts Wednesday, Finish Date Wednesday, Duration = 1
# Visuals
<figure class="image op-uc-figure" style="width:55.55%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/20507/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 (##18416)
* Summing durations
* Grouping by durations
# Implementation notes
* Frontend:
* include duration in date picker
* Hide the duration if the work package has a milestone task
* 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.