Skip to content

In calendar widget, improve default values of "Start Date", "End Date", "Start Time" and "End Time" #5

@lredor

Description

@lredor

In the calendar widget, when no value is set, the default is the current date and time.
However, it could be more relevant to consider existing work packages and tasks within the project.
If available, the project’s contractual or effective start date could also be used as a reference.

Rules for the Start Date of a work package:

  • If there is no existing work package in the project:
    • The default value could be the project’s Contractual Start Date.
    • If the Effective Start Date is set, it should be preferred.
  • The default value for End Date could be set to the day after the Start Date.
  • If a work package is under another work package:
    • The default Start Date could be just after the End Date of the previous work package.
    • If the End Date of the previous work package is not defined, the Start Date could be used instead.

Rules for the Start Time of a task could be:

  • If The task is inside a work package with a defined Start Date:
    • The task's default Start Time could be this date at "00:00".
  • The default value for End Time could be set to the sale date at "23:59".
  • If a task is under another task:
    • The default Start Time could be just after the End Time of the previous task.
    • If the End Time of the previous task is not defined, its Start Time could be used.

Example1:

  • The project "My project" has a "Contractual Start Date" set to 01/09/2025.
  • A work package WP1 is created on 28/07/2025.
  • When opening the widget calendar, the default is 28/07/2025.
  • It would be more relevant to prefill it with 01/09/2025.
Image

Example2:

  • The work package "WP1" has a "Start Date" set to 08/09/2025.
  • A task "MyTask" is created the 28/07/2025 at 15h15.
  • The calendar widget sets the initial Start Time to 28/07/2025 at 15h15.
  • It would be better to prefill it with 08/09/2025 at 00:00.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions