Skip to content

Conversation

@jmgasper
Copy link
Collaborator

Fix what dates are used in challenge-details page.

@jmgasper jmgasper requested a review from kkartunov as a code owner October 30, 2025 19:49
}
// for other cases, take the `actualEndDate` as phase is already closed
return new Date(phase.scheduledEndDate || phase.actualEndDate);
return new Date(phase.actualEndDate || phase.scheduledEndDate);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from new Date(phase.scheduledEndDate || phase.actualEndDate) to new Date(phase.actualEndDate || phase.scheduledEndDate) alters the logic to prioritize actualEndDate over scheduledEndDate. Ensure this change aligns with the intended business logic, as it may affect how end dates are calculated for phases that are already closed.

}
// For all other cases, take the `actualStartDate` as phase is already started
return new Date(phase.scheduledStartDate || phase.actualStartDate);
return new Date(phase.actualStartDate || phase.scheduledStartDate);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Similar to the change in phaseEndDate, the logic now prioritizes actualStartDate over scheduledStartDate. Verify that this change is consistent with the desired behavior for phases that have already started, as it could impact the start date calculations.

@kkartunov kkartunov merged commit 71a7ac1 into develop Nov 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants