Content
View differences
Updated by Oliver Günther almost 4 years ago
### Note
Extracted from Epic <mention class="mention" data-id="31992" data-type="work_package" data-text="#31992">#31992</mention> related to duration.
This work package describes how values for the start date, the finish date and duration should change in response to changes to any of one of them.
A lot of these are self-explanatory, but explicitly describing these behaviours helps us particularly in the testing phase to ensure that the date picker behaves as logically and intuitively as possible, whilst also reducing chances of data loss (for example, accidentally having a start date change when the user does not expect it).
### Scenarios
#### Scenario 1
* Setup.
* Start date: Monday, February 8, 2021
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days (duration in focus)
* Expected result:
* The finish date is set Friday, February 19 2021 (derived)
#### 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 (duration in focus).
* Expected result:
* The start date is set to Monday, February 8, 2021 (derived)
#### Scenario 4
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Friday, February 19, 2021
* Duration: 10
* Change
* User changes duration to 11 days (duration in focus).
* 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 changes duration to 10 days (duration in focus)
* Expected result:
* The finish date is changed to Friday, February 19, 2021
* (If the option to include NWD is then also enabled, the finish date would change to Wednseday, February 17 2021; this is specified more in detail [starting from Scenario 15](https://community.openproject.org/projects/openproject/work_packages/43539/activity#scenario-15)).
#### Scenario 6
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Friday, February 12, 2021
* Duration: 3
* Change
* Remove duration.
* Expected result
* Finish date is also removed, start date is maintained as is.
#### Scenario 7
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 4
* Change
* User alters the start date to Tuesday, February 9, 2021 (start date in focus)
* Expected result
* Finish date is maintained, duration is automatically adjusted to 3 days (derived; logic = changing one date when the other is present affects duration vs. move the second date).
#### Scenario 8
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Friday, February 12, 2021
* Duration: 4
* Change
* User alters the finish date to Feb 11, 2021 (finish date is in focus).
* Expected result
* Start date is unaffected, duration is now set to 3 days (derived from dates)
#### Scenario 9
* Setup
* Start date: empty
* Finish date: empty
* Duration: 4
* Change
* User enters the finish date of Friday, February 12, 2021 (finish date in focus).
* Expected result
* The start date is set to Tuesday, February 9, 2021 (derived from duration).
#### 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 (start date in focus).
* Expected result
* Duration is set to 3 (derived from start date)
#### Scenario 11
* Setup
* Start date: Monday, February 9, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 3
* Change
* The 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 date is left unchanged.
#### Scenario 12 (GANTT/Team planner)
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday February 11, 2021
* Duration: 3
* Change
* The user moves the work package by dragging it (on the GANTT/team planner) it to the **right** so start date is Wednesday, February 10, 2021.
* Expected result
* The duration is maintained. Start state is now Wednesday, Febuary 10 (as set by drag), end date is set Friday, February 12 (derived based on duration).
#### Scenario 12bis (GANTT/Team planner)
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday February 11, 2021
* Duration: 3
* Change
* The user moves the work package by dragging it (on the GANTT/team planner) it to the **left** so start date is Monday, Febuary 8, 2021.
* Expected result
* The duration is maintained. Start state is now Monday, February 8, 2021 (as set by drag), end date is set to Wednesday, February 11 (derived based on duration).
#### Scenario 13
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday, February 11, 2021
* Duration: 3
* Change
* The user changes the start day on the datepicker to Wednesday, March 3, 2021 (note that this is _after_ the original finish date).
* Expected result
* The start date is set to Wednesday, March 3, 2021
* The finish date is cleared.
* Duration is cleared.
#### Scenario 14
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday, February 11, 2021
* Duration: 3
* Change
* The user changes the start day on the datepicker to Wednesday, February 3, 2021 (note that this is _before_ the original start date).
* Expected result
* The start date is now Wednesday, February 3.
* The finish date is now Friday, February 5.
* The duration is conserved: 3 days.
**Note: The following scenarios concern the option to include non-working days.**
#### Scenario 15
* Setup
* Start date: Thursday, February 11, 2021
* Finish date: Tuesday, February 16, 2021
* Duration: 4 days
* Change
* Option to include non-working days is enabled
* Expected result
* Start date remains Thursday, February 11, 2021
* Finish date is changed to Sunday, February 14, 2021
* Duration is conserved (4 days)
#### Scenario 16
* Setup
* Non-working days are included
* Start date: Thursday, February 11, 2021
* Finish date: Sunday, February 14, 2021
* Duration: 4 days
* Change
* Option to include non-working days is disabled
* Expected result
* Start date remains Thursday, February 11, 2021
* Finish date is changed to Tuesday, February 16, 2021
* Duration is conserved (4 days)
#### Scenario 17
* Setup
* Non-working days are included
* Start date: Saturday, February 13, 2021
* Finish date: Sunday, February 14, 2021
* Duration: 2 days
* Change
* Option to include non-working days is disabled
* Expected result
* Start date changes to Monday, February 15, 2021
* Finish date is changed to Tuesday, February 16, 2021
* Duration is conserved (2 days)
#### Scenario 18
* Setup
* Non-working days are included
* Start date: Saturday, February 13, 2021
* Finish date: Tuesday, February 23, 2021
* Duration: 11 days
* Change
* Option to include non-working days is disabled
* Expected result
* Start date changes to Monday, February 15, 2021
* Finish date is changed to Monday, March 1, 2, 2021
* Duration is conserved (11 days)
#### Scenario 19
* Setup
* Non-working days are included
* Start date: Saturday, February 13, 2021
* Finish date: -
* Duration: -
* Change
* Option to include non-working days is disabled
* Expected result
* Start date changes to Monday, February 15, 2021
* Finish date is still empty
* Duration is still empty
#### Scenario 20
* Setup
* Non-working days are included
* Start date: -
* Finish date: Sunday, February 21, 2021
* Duration: -
* Change
* Option to include non-working days is disabled
* Expected result
* Start date is still empty
* Finish date is Monday, February 22, 2021
* Duration is still empty
Extracted from Epic <mention class="mention" data-id="31992" data-type="work_package" data-text="#31992">#31992</mention> related to duration.
This work package describes how values for the start date, the finish date and duration should change in response to changes to any of one of them.
A lot of these are self-explanatory, but explicitly describing these behaviours helps us particularly in the testing phase to ensure that the date picker behaves as logically and intuitively as possible, whilst also reducing chances of data loss (for example, accidentally having a start date change when the user does not expect it).
### Scenarios
#### Scenario 1
* Setup.
* Start date: Monday, February 8, 2021
* Finish date: empty
* Duration: empty
* Change
* User enters a duration of 10 days (duration in focus)
* Expected result:
* The finish date is set Friday, February 19 2021 (derived)
#### 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 (duration in focus).
* Expected result:
* The start date is set to Monday, February 8, 2021 (derived)
#### Scenario 4
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Friday, February 19, 2021
* Duration: 10
* Change
* User changes duration to 11 days (duration in focus).
* 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 changes duration to 10 days (duration in focus)
* Expected result:
* The finish date is changed to Friday, February 19, 2021
* (If the option to include NWD is then also enabled, the finish date would change to Wednseday, February 17 2021; this is specified more in detail [starting from Scenario 15](https://community.openproject.org/projects/openproject/work_packages/43539/activity#scenario-15)).
#### Scenario 6
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Friday, February 12, 2021
* Duration: 3
* Change
* Remove duration.
* Expected result
* Finish date is also removed, start date is maintained as is.
#### Scenario 7
* Setup
* Start date: Monday, February 8, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 4
* Change
* User alters the start date to Tuesday, February 9, 2021 (start date in focus)
* Expected result
* Finish date is maintained, duration is automatically adjusted to 3 days (derived; logic = changing one date when the other is present affects duration vs. move the second date).
#### Scenario 8
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Friday, February 12, 2021
* Duration: 4
* Change
* User alters the finish date to Feb 11, 2021 (finish date is in focus).
* Expected result
* Start date is unaffected, duration is now set to 3 days (derived from dates)
#### Scenario 9
* Setup
* Start date: empty
* Finish date: empty
* Duration: 4
* Change
* User enters the finish date of Friday, February 12, 2021 (finish date in focus).
* Expected result
* The start date is set to Tuesday, February 9, 2021 (derived from duration).
#### 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 (start date in focus).
* Expected result
* Duration is set to 3 (derived from start date)
#### Scenario 11
* Setup
* Start date: Monday, February 9, 2021
* Finish date: Wednesday, February 11, 2021
* Duration: 3
* Change
* The 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 date is left unchanged.
#### Scenario 12 (GANTT/Team planner)
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday February 11, 2021
* Duration: 3
* Change
* The user moves the work package by dragging it (on the GANTT/team planner) it to the **right** so start date is Wednesday, February 10, 2021.
* Expected result
* The duration is maintained. Start state is now Wednesday, Febuary 10 (as set by drag), end date is set Friday, February 12 (derived based on duration).
#### Scenario 12bis (GANTT/Team planner)
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday February 11, 2021
* Duration: 3
* Change
* The user moves the work package by dragging it (on the GANTT/team planner) it to the **left** so start date is Monday, Febuary 8, 2021.
* Expected result
* The duration is maintained. Start state is now Monday, February 8, 2021 (as set by drag), end date is set to Wednesday, February 11 (derived based on duration).
#### Scenario 13
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday, February 11, 2021
* Duration: 3
* Change
* The user changes the start day on the datepicker to Wednesday, March 3, 2021 (note that this is _after_ the original finish date).
* Expected result
* The start date is set to Wednesday, March 3, 2021
* The finish date is cleared.
* Duration is cleared.
#### Scenario 14
* Setup
* Start date: Tuesday, February 9, 2021
* Finish date: Thursday, February 11, 2021
* Duration: 3
* Change
* The user changes the start day on the datepicker to Wednesday, February 3, 2021 (note that this is _before_ the original start date).
* Expected result
* The start date is now Wednesday, February 3.
* The finish date is now Friday, February 5.
* The duration is conserved: 3 days.
**Note: The following scenarios concern the option to include non-working days.**
#### Scenario 15
* Setup
* Start date: Thursday, February 11, 2021
* Finish date: Tuesday, February 16, 2021
* Duration: 4 days
* Change
* Option to include non-working days is enabled
* Expected result
* Start date remains Thursday, February 11, 2021
* Finish date is changed to Sunday, February 14, 2021
* Duration is conserved (4 days)
#### Scenario 16
* Setup
* Non-working days are included
* Start date: Thursday, February 11, 2021
* Finish date: Sunday, February 14, 2021
* Duration: 4 days
* Change
* Option to include non-working days is disabled
* Expected result
* Start date remains Thursday, February 11, 2021
* Finish date is changed to Tuesday, February 16, 2021
* Duration is conserved (4 days)
#### Scenario 17
* Setup
* Non-working days are included
* Start date: Saturday, February 13, 2021
* Finish date: Sunday, February 14, 2021
* Duration: 2 days
* Change
* Option to include non-working days is disabled
* Expected result
* Start date changes to Monday, February 15, 2021
* Finish date is changed to Tuesday, February 16, 2021
* Duration is conserved (2 days)
#### Scenario 18
* Setup
* Non-working days are included
* Start date: Saturday, February 13, 2021
* Finish date: Tuesday, February 23, 2021
* Duration: 11 days
* Change
* Option to include non-working days is disabled
* Expected result
* Start date changes to Monday, February 15, 2021
* Finish date is changed to Monday, March 1,
* Duration is conserved (11 days)
#### Scenario 19
* Setup
* Non-working days are included
* Start date: Saturday, February 13, 2021
* Finish date: -
* Duration: -
* Change
* Option to include non-working days is disabled
* Expected result
* Start date changes to Monday, February 15, 2021
* Finish date is still empty
* Duration is still empty
#### Scenario 20
* Setup
* Non-working days are included
* Start date: -
* Finish date: Sunday, February 21, 2021
* Duration: -
* Change
* Option to include non-working days is disabled
* Expected result
* Start date is still empty
* Finish date is Monday, February 22, 2021
* Duration is still empty