Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sql/reports/topgear/hourly.sql
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ registration_end AS (
submission_end AS (
SELECT
cp."challengeId" AS challenge_id,
MAX(COALESCE(cp."actualEndDate", cp."scheduledEndDate")) AS submission_end_date
cp."scheduledEndDate" AS submission_end_date

Choose a reason for hiding this comment

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

[❗❗ correctness]
Changing the calculation of submission_end_date to use only cp."scheduledEndDate" instead of MAX(COALESCE(cp."actualEndDate", cp."scheduledEndDate")) could lead to incorrect results if actualEndDate is set and differs from scheduledEndDate. Ensure that this change aligns with the intended logic and that actualEndDate is not required for any business logic.

FROM challenges."ChallengePhase" cp
JOIN challenges."Phase" p ON p.id = cp."phaseId"
WHERE p.name IN ('Topcoder Submission', 'Topgear Submission', 'Submission')
Expand All @@ -117,7 +117,7 @@ SELECT
bc.name AS challenge_name,
bc.status AS challenge_status,
ct.name AS challenge_type,
reg.registration_end_date AS registration_end_date,
reg.registration_end_date AS registration_end_date,
se.submission_end_date AS submission_end_date,
pd.latest_actual_end_date AS completed_date,
mt.onsite_efforts AS onsite_efforts,
Expand Down
Loading