Skip to content

Introducing a new field actualStartDate to the milestone model #158

@vikasrohit

Description

@vikasrohit

Requirement: We need to track the actual start date of the milestone to avoid confusion around shifting scheduled startDate when two or more milestones are completed on the same day. By default we start a milestone next day to the completion of the previous one, but user might complete two or more milestones on the same day which is creating inconsistent data(startDate being greater than completionDate) in database. To better capture that use case, we are going to add the new field actualStartDate which would only be populated when milestone is marked as active. So, it would have the same actualStartDate and completionDate for the milestone when the milestone is activated and completed on the same day.

  1. Add the new field actualStartDate field to the milestone model
  2. Update actualStartDate for milestone when ever we are setting the milestone status to active, no matter in which endpoint. So, we have to check in the code wherever we are updating the status of a milestone, we need to set this field to current date if target status is active.
  3. Allow updating this field in PATCH /v4/timelines/123/milestones/1234 endpoint. if both actualStartDate and completionDate are provided, completionDate should be greater than or equal to the actualStartDate.
  4. Return the new field in LIST and GET endpoints of timelines and milestones
  5. Update Unit tests to verify the presence of this new field and being set to the correct value

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions