Conversation
PM-2525 Swap dates shown on challenge details page
V6 hotfixes -> dev
| } | ||
| // 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); |
There was a problem hiding this comment.
[❗❗ correctness]
The change in logic from phase.scheduledEndDate || phase.actualEndDate to phase.actualEndDate || phase.scheduledEndDate could potentially alter the behavior of the function. Ensure that this change is intentional and that actualEndDate should indeed take precedence over scheduledEndDate in all scenarios.
| } | ||
| // 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); |
There was a problem hiding this comment.
[❗❗ correctness]
Similar to the change in phaseEndDate, the logic here has been altered from phase.scheduledStartDate || phase.actualStartDate to phase.actualStartDate || phase.scheduledStartDate. Verify that this change is intentional and that actualStartDate should take precedence over scheduledStartDate in all cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://topcoder.atlassian.net/browse/PM-2525