Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 12f4d1a

Browse files
committed
revise the logic for marathon match rounds
1 parent 4088437 commit 12f4d1a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main/resources/sql/mm-feeder-into-challenges/get_marathon_matches_for_challenge_listing.sql

+4-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ tcdirect.name as projectName,
1010
'SYSTEM' as reviewType,
1111
r.forum_id as forumId,
1212
CASE
13-
WHEN (r.status = 'P') THEN 'Completed'
14-
WHEN (r.status = 'A') THEN 'Active'
15-
WHEN (r.status = 'F') THEN 'Draft'
16-
WHEN (r.status = 'X') THEN 'Deleted'
17-
WHEN (r.status = 'T') THEN 'Active'
18-
ELSE 'Open'
13+
WHEN (rs_sub.start_time > CURRENT) THEN 'Draft'
14+
WHEN (rs_sub.end_time > CURRENT AND CURRENT >= rs_sub.start_time ) THEN 'Active'
15+
WHEN (CURRENT > rs_sub.end_time) THEN 'Completed'
16+
ELSE 'Unknown'
1917
END as status,
2018
rs_reg.start_time as registrationStartDate,
2119
rs_reg.end_time as registrationEndDate,

0 commit comments

Comments
 (0)