Content
View differences
Updated by Christophe Bliard about 1 year ago
### Note
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. We created a [similar document with scenarios previously](https://community.openproject.org/wp/43539) when we added duration to the date picker, which made it easier:
* For devs to write test cases
* Document behaviour
* Use it for testing
**Note:** In all these scenarios, Saturday and Sunday are non-working days.
### Scenarios
#### Scenario 1 🟢
* Setup
* Start date: Wednesday, January 8, 2025
* Finish date: empty
* Duration: empty
* Working days only: on
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is set Tuesday, January 21 2025 (derived)
<br>
#### 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
<br>
#### Scenario 3 🟢
* Setup
* Start date: empty
* Finish date: Tuesday, January 21 2025
* Duration: empty
* Working days only: on
* Change
* User enters a duration of 10 days
* Expected result:
* The start date is set to Wednesday, January 8, 2025 (derived)
<br>
#### Scenario 4 🟢
* Setup
* Start date: Monday, January 13, 2025
* Finish date: Friday, January 24, 2025
* Duration: 10 days
* Working days only: on
* Change
* User changes duration to 11 days
* Expected result:
* The finish date is changed to Monday, January 27, 2025
<br>
#### Scenario 5 🟢
* Setup
* Start date: Monday, January 6, 2025
* Finish date: Monday, January 20, 2025
* Duration: 11
* Working days only: on
* Change
* User changes duration to 10 days
* Expected result:
* The finish date is changed to Friday, January 17, 2025
<br>
#### Scenario 6 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* Remove duration by clearing duration field
* Expected result
* Finish date is also removed, start date is maintained as is:
* Start date: Tuesday, January 7, 2025
* Finish date: -
* Duration: -
<br>
#### Scenario 6a 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* Remove duration by focusing duration field and clicking the "x"
* Expected result
* Finish date is also removed, start date is maintained as is:
* Start date: Tuesday, January 7, 2025
* Finish date: -
* Duration: -
<br>
#### Scenario 7 🟢
* Setup
* Start date: Monday, January 6, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 4
* Change
* User alters the start date to Tuesday, January 7, 2025
* 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).
* \[open\] Challenge?
* 🟢 \[Chris\] Yes! I totally approve this scenario. I think that's the correct behavior. Before, it would have kept the duration and change the end date, which I always found counter-intuitive.
<br>
#### Scenario 8 🟢
* Setup
* Start date: Monday, January 6, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 4
* Change
* User alters the finish date to January 10, 2025
* Expected result
* Start date is unaffected, duration is now set to 5 days:
* Start date: Monday, January 6, 2025
* Finish date: Friday, January 10, 2025
* Duration: 5
<br>
#### Scenario 9 🟢
* Setup
* Start date: empty
* Finish date: empty
* Duration: 4
* Change
* User enters the finish date of Friday, January 10, 2025 (finish date in focus).
* Expected result
* The start date is set to Tuesday, January 7, 2025 (derived from duration):
* Start date: Tuesday, January 7, 2025
* Finish date: Friday, January 10, 2025
* Duration: 4
<br>
#### Scenario 10 🟢
* Setup
* Start date: empty
* Finish date: Thursday, January 9, 2025
* Duration: empty
* Change
* User enters the start date of Tuesday, January 7, 2025
* Expected result
* Duration is set to 3 (derived from start date):
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
<br>
#### Scenario 13 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* The user changes the start day on the date picker to Wednesday, February 15, 2025 (note that this is _after_ the original finish date)
* Expected result
* The start date is set to Wednesday, February 15
* The finish date is cleared
* Duration is cleared
<br>
#### Scenario 13a 🟢
* Setup
* Start date: Thursday, January 23, 2025
* Finish date: empty
* Duration: empty
* Today's date is Tuesday, January 21, 2025
* Change
* The user clicks the "Today" link under the Finish date field
* Expected result
* The finish date is set to Tuesday, February 21, 2021
* The start date is cleared
* Duration is cleared
<br>
#### Scenario 14 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* The user changes the start day on the date picker to Monday, January 6, 2025 (note that this is _before_ the original start date).
* Expected result
* The start date is now Monday, January 6, 2025
* The finish date is maintained at Thursday, January 9, 2025
* The duration changes to 4 days.
* (In previous version, the duration would be kept and finish date would be derived. This is no longer the case: we keep always keep dates and derive duration)
<br>
#### Scenario 15 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: Tuesday, January 14, 2025
* Duration: 4
* Working days only: on
* Change
* Working days only: off
* Expected result
* Start date remains Thursday, January 9, 2025
* Finish date remains Tuesday, is changed to Sunday, January 14, 12, 2025
* Duration changes to 6 days is conserved (4 days)
<br>
#### Scenario 16 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: Tuesday, Sunday, January 14, 12, 2025
* Duration: 6 4
* Working days only: off
* Change
* Working days only: on
* Expected result
* Start date remains Thursday, January 9, 2025
* Finish date remains is changed to Tuesday, January 14, 2025
* Duration changes to 4 days is conserved (4 days)
<br>
#### Scenario 17 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: 2
* Change
* Working days only: on
* Expected result
* Start date changes to Monday, January 13, 2025 (next working day after January 11)
* Finish date changes is changed to Monday, Tuesday, January 13, 14, 2025 (next working day after January 12)
* Duration changes to 1 day is conserved (2 days)
<br>
#### Scenario 18 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Tuesday, January 21, 2025
* Working days only: off
* Duration: 11 days
* Change
* Working days only: on
* Expected result
* Start date changes to Monday, January 13, 2025
* Finish date remains Tuesday, is changed to Monday, January 21, 27, 2025
* Duration changes to 7 days is conserved (11 days)
<br>
#### Scenario 19 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: -
* Working days only: off
* Duration: -
* Change
* Working days only: on
* Expected result
* Start date changes to Monday, January 13, 2025
* Finish date is still empty
* Duration is still empty
* Note
* if "Working days only" is switched off again, the start date _could_ go back to Saturday Jan 11, but this is not a requirement. Both behaviors are acceptable.
<br>
#### Scenario 20 🟢
* Setup
* Start date: -
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: -
* Change
* Working days only: on
* Expected result
* Start date is still empty
* Finish date is Monday, February 13, 2025
* Duration is still empty
<br>
#### Scenario 21a 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: 2
* Change
* Clear start date
* Expected result
* Start date is removed
* Duration is removed
* Finish date is maintained at Sunday, January 12, 2025
<br>
#### Scenario 21b 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: 2
* Change
* Finish date is cleared
* Expected result
* Start date is maintained at Saturday, January 11, 2025
* Finish date is removed
* Duration is removed
<br>
#### Scenario 22a 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: -
* Duration: -
* Change
* With duration in focus, click on Wednesday, January 8, 2025
* Note: this is one day _earlier_ than the current start date
* Expected result
* Start date is updated to at Wednesday, January 8, 2025 (the clicked date)
* Finish date is set to Thursday, January 9, 2025 (the previous start date)
* Focus is set to finish date
* Duration is derived as 2 days
<br>
#### Scenario 22b 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: -
* Duration: -
* Change
* With duration in focus, click on Friday, January 10, 2025
* Note: this is one day _after_ than the current start date
* Expected result
* Start date stays at Thursday, January 9, 2025
* Finish date is set to Friday, January 10, 2025
* Duration is derived as 2 days
* Focus is set to start date
<br>
#### Scenario 23a 🟢
* Setup
* Start date: empty
* Finish date: Thursday, January 9, 2025
* Duration: empty
* Change
* With duration in focus, click on Friday, January 10, 2025
* Expected result
* Start date is set to Thursday, January 9, 2025 (the previous finish date)
* Finish date is updated to Friday, January 10, 2025 (the clicked date)
* Duration is derived as 2 days
* Focus is set to start date
<br>
#### Scenario 23b 🟢
* Setup
* Start date: empty
* Finish date: Thursday, January 9, 2025
* Duration: empty
* Change
* With duration in focus, click on Wednesday, January 8, 2025
* Expected result
* Start date is set to Wednesday, January 8, 2025 (the clicked date)
* Finish date remains Thursday, January 9, 2025
* Duration is derived as 2 days
* Focus is set to finish date
#### Scenario 24a: Single date change (Start date) 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: -
* Duration: -
* Change
* With start date in focus, click on Friday, January 10, 2025
* Expected result
* Start date is now Friday, January 10, 2025 (the clicked date)
* Finish date remains empty
* Duration remains empty
* Focus is moved to Finish date (range mode with new start date)
####
#### Scenario 24b: Single date change (Finish date) 🟢
* Setup
* Start date: -
* Finish date: Friday, January 10, 2025
* Duration: -
* Change
* With finish date in focus, click on Thu, Jan 16, 2025
* Expected result
* Finish date is now Thu, Jan 16, 2025 (the clicked date)
* Start date remains empty
* Duration remains empty
* Focus is moved to Start date (range mode with new finish date)
<br>
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. We created a [similar document with scenarios previously](https://community.openproject.org/wp/43539) when we added duration to the date picker, which made it easier:
* For devs to write test cases
* Document behaviour
* Use it for testing
**Note:** In all these scenarios, Saturday and Sunday are non-working days.
### Scenarios
#### Scenario 1 🟢
* Setup
* Start date: Wednesday, January 8, 2025
* Finish date: empty
* Duration: empty
* Working days only: on
* Change
* User enters a duration of 10 days
* Expected result:
* The finish date is set Tuesday, January 21 2025 (derived)
<br>
#### 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
<br>
#### Scenario 3 🟢
* Setup
* Start date: empty
* Finish date: Tuesday, January 21 2025
* Duration: empty
* Working days only: on
* Change
* User enters a duration of 10 days
* Expected result:
* The start date is set to Wednesday, January 8, 2025 (derived)
<br>
#### Scenario 4 🟢
* Setup
* Start date: Monday, January 13, 2025
* Finish date: Friday, January 24, 2025
* Duration: 10 days
* Working days only: on
* Change
* User changes duration to 11 days
* Expected result:
* The finish date is changed to Monday, January 27, 2025
<br>
#### Scenario 5 🟢
* Setup
* Start date: Monday, January 6, 2025
* Finish date: Monday, January 20, 2025
* Duration: 11
* Working days only: on
* Change
* User changes duration to 10 days
* Expected result:
* The finish date is changed to Friday, January 17, 2025
<br>
#### Scenario 6 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* Remove duration by clearing duration field
* Expected result
* Finish date is also removed, start date is maintained as is:
* Start date: Tuesday, January 7, 2025
* Finish date: -
* Duration: -
<br>
#### Scenario 6a 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* Remove duration by focusing duration field and clicking the "x"
* Expected result
* Finish date is also removed, start date is maintained as is:
* Start date: Tuesday, January 7, 2025
* Finish date: -
* Duration: -
<br>
#### Scenario 7 🟢
* Setup
* Start date: Monday, January 6, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 4
* Change
* User alters the start date to Tuesday, January 7, 2025
* 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).
* \[open\] Challenge?
* 🟢 \[Chris\] Yes! I totally approve this scenario. I think that's the correct behavior. Before, it would have kept the duration and change the end date, which I always found counter-intuitive.
<br>
#### Scenario 8 🟢
* Setup
* Start date: Monday, January 6, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 4
* Change
* User alters the finish date to January 10, 2025
* Expected result
* Start date is unaffected, duration is now set to 5 days:
* Start date: Monday, January 6, 2025
* Finish date: Friday, January 10, 2025
* Duration: 5
<br>
#### Scenario 9 🟢
* Setup
* Start date: empty
* Finish date: empty
* Duration: 4
* Change
* User enters the finish date of Friday, January 10, 2025 (finish date in focus).
* Expected result
* The start date is set to Tuesday, January 7, 2025 (derived from duration):
* Start date: Tuesday, January 7, 2025
* Finish date: Friday, January 10, 2025
* Duration: 4
<br>
#### Scenario 10 🟢
* Setup
* Start date: empty
* Finish date: Thursday, January 9, 2025
* Duration: empty
* Change
* User enters the start date of Tuesday, January 7, 2025
* Expected result
* Duration is set to 3 (derived from start date):
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
<br>
#### Scenario 13 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* The user changes the start day on the date picker to Wednesday, February 15, 2025 (note that this is _after_ the original finish date)
* Expected result
* The start date is set to Wednesday, February 15
* The finish date is cleared
* Duration is cleared
<br>
#### Scenario 13a 🟢
* Setup
* Start date: Thursday, January 23, 2025
* Finish date: empty
* Duration: empty
* Today's date is Tuesday, January 21, 2025
* Change
* The user clicks the "Today" link under the Finish date field
* Expected result
* The finish date is set to Tuesday, February 21, 2021
* The start date is cleared
* Duration is cleared
<br>
#### Scenario 14 🟢
* Setup
* Start date: Tuesday, January 7, 2025
* Finish date: Thursday, January 9, 2025
* Duration: 3
* Change
* The user changes the start day on the date picker to Monday, January 6, 2025 (note that this is _before_ the original start date).
* Expected result
* The start date is now Monday, January 6, 2025
* The finish date is maintained at Thursday, January 9, 2025
* The duration changes to 4 days.
* (In previous version, the duration would be kept and finish date would be derived. This is no longer the case: we keep always keep dates and derive duration)
<br>
#### Scenario 15 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: Tuesday, January 14, 2025
* Duration: 4
* Working days only: on
* Change
* Working days only: off
* Expected result
* Start date remains Thursday, January 9, 2025
* Finish date remains Tuesday,
* Duration changes to 6 days
<br>
#### Scenario 16 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: Tuesday,
* Duration: 6
* Working days only: off
* Change
* Working days only: on
* Expected result
* Start date remains Thursday, January 9, 2025
* Finish date remains
* Duration changes to 4 days
<br>
#### Scenario 17 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: 2
* Change
* Working days only: on
* Expected result
* Start date changes to Monday, January 13, 2025 (next working day after January 11)
* Finish date changes
* Duration changes to 1 day
<br>
#### Scenario 18 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Tuesday, January 21, 2025
* Working days only: off
* Duration: 11 days
* Change
* Working days only: on
* Expected result
* Start date changes to Monday, January 13, 2025
* Finish date remains Tuesday,
* Duration changes to 7 days
<br>
#### Scenario 19 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: -
* Working days only: off
* Duration: -
* Change
* Working days only: on
* Expected result
* Start date changes to Monday, January 13, 2025
* Finish date is still empty
* Duration is still empty
* Note
* if "Working days only" is switched off again, the start date _could_ go back to Saturday Jan 11, but this is not a requirement. Both behaviors are acceptable.
<br>
#### Scenario 20 🟢
* Setup
* Start date: -
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: -
* Change
* Working days only: on
* Expected result
* Start date is still empty
* Finish date is Monday, February 13, 2025
* Duration is still empty
<br>
#### Scenario 21a 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: 2
* Change
* Clear start date
* Expected result
* Start date is removed
* Duration is removed
* Finish date is maintained at Sunday, January 12, 2025
<br>
#### Scenario 21b 🟢
* Setup
* Start date: Saturday, January 11, 2025
* Finish date: Sunday, January 12, 2025
* Working days only: off
* Duration: 2
* Change
* Finish date is cleared
* Expected result
* Start date is maintained at Saturday, January 11, 2025
* Finish date is removed
* Duration is removed
<br>
#### Scenario 22a 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: -
* Duration: -
* Change
* With duration in focus, click on Wednesday, January 8, 2025
* Note: this is one day _earlier_ than the current start date
* Expected result
* Start date is updated to at Wednesday, January 8, 2025 (the clicked date)
* Finish date is set to Thursday, January 9, 2025 (the previous start date)
* Focus is set to finish date
* Duration is derived as 2 days
<br>
#### Scenario 22b 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: -
* Duration: -
* Change
* With duration in focus, click on Friday, January 10, 2025
* Note: this is one day _after_ than the current start date
* Expected result
* Start date stays at Thursday, January 9, 2025
* Finish date is set to Friday, January 10, 2025
* Duration is derived as 2 days
* Focus is set to start date
<br>
#### Scenario 23a 🟢
* Setup
* Start date: empty
* Finish date: Thursday, January 9, 2025
* Duration: empty
* Change
* With duration in focus, click on Friday, January 10, 2025
* Expected result
* Start date is set to Thursday, January 9, 2025 (the previous finish date)
* Finish date is updated to Friday, January 10, 2025 (the clicked date)
* Duration is derived as 2 days
* Focus is set to start date
<br>
#### Scenario 23b 🟢
* Setup
* Start date: empty
* Finish date: Thursday, January 9, 2025
* Duration: empty
* Change
* With duration in focus, click on Wednesday, January 8, 2025
* Expected result
* Start date is set to Wednesday, January 8, 2025 (the clicked date)
* Finish date remains Thursday, January 9, 2025
* Duration is derived as 2 days
* Focus is set to finish date
#### Scenario 24a: Single date change (Start date) 🟢
* Setup
* Start date: Thursday, January 9, 2025
* Finish date: -
* Duration: -
* Change
* With start date in focus, click on Friday, January 10, 2025
* Expected result
* Start date is now Friday, January 10, 2025 (the clicked date)
* Finish date remains empty
* Duration remains empty
* Focus is moved to Finish date (range mode with new start date)
####
#### Scenario 24b: Single date change (Finish date) 🟢
* Setup
* Start date: -
* Finish date: Friday, January 10, 2025
* Duration: -
* Change
* With finish date in focus, click on Thu, Jan 16, 2025
* Expected result
* Finish date is now Thu, Jan 16, 2025 (the clicked date)
* Start date remains empty
* Duration remains empty
* Focus is moved to Start date (range mode with new finish date)
<br>