diff --git a/actions/challenges.js b/actions/challenges.js index 731f827f4..f0ad906ab 100755 --- a/actions/challenges.js +++ b/actions/challenges.js @@ -1,7 +1,7 @@ /* * Copyright (C) 2013 - 2014 TopCoder Inc., All Rights Reserved. * - * @version 1.18 + * @version 1.19 * @author Sky_, mekanizumu, TCSASSEMBLER, freegod, Ghost_141, kurtrips, xjtufreeman, ecnu_haozi, hesibo, LazyChild * @changes from 1.0 * merged with Member Registration API @@ -44,6 +44,8 @@ * add API for submitting to design challenge * changes in 1.18: * add clientSelection flag in studio results + * changes in 1.19: + * add new allowed sort columns. */ "use strict"; /*jslint stupid: true, unparam: true, continue: true */ @@ -90,7 +92,8 @@ var ALLOWABLE_QUERY_PARAMETER = [ */ var ALLOWABLE_SORT_COLUMN = [ "challengeName", "challengeType", "challengeId", "cmcTaskId", "registrationEndDate", - "submissionEndDate", "finalFixEndDate", "prize1", "currentStatus", "digitalRunPoints" + "submissionEndDate", "finalFixEndDate", "prize1", "currentStatus", "digitalRunPoints", + "postingDate", "numSubmissions", "numRegistrants", "currentPhaseRemainingTime", "currentPhaseName", "registrationOpen" ]; /** @@ -357,7 +360,8 @@ function transferResult(src, helper) { digitalRunPoints: row.digital_run_points, prize: [], reliabilityBonus: helper.getReliabilityBonus(row.prize1), - challengeCommunity: row.is_studio ? 'design' : 'develop' + challengeCommunity: row.is_studio ? 'design' : 'develop', + registrationOpen: row.registration_open }); for (i = 1; i < 10; i = i + 1) { diff --git a/initializers/helper.js b/initializers/helper.js index 853e4e42e..aa1cc0c7b 100644 --- a/initializers/helper.js +++ b/initializers/helper.js @@ -153,7 +153,13 @@ var apiName2dbNameMap = { numberofsubmissions: 'number_of_submissions', numberofreviewpositionsavailable: 'number_of_review_positions_available', round2scheduledstartdate: 'round_2_scheduled_start_date', - round1scheduledstartdate: 'round_1_scheduled_start_date' + round1scheduledstartdate: 'round_1_scheduled_start_date', + postingdate: 'posting_date', + numsubmissions: 'num_submissions', + numregistrants: 'num_registrants', + currentphaseremainingtime: 'current_phase_remaining_time', + currentphasename: 'current_phase_name', + registrationopen: 'registration_open' }; /** diff --git a/queries/search_software_studio_challenges b/queries/search_software_studio_challenges index 53c98205d..67630c7bc 100644 --- a/queries/search_software_studio_challenges +++ b/queries/search_software_studio_challenges @@ -47,6 +47,7 @@ FIRST @pageSize@ , (SELECT event_short_desc from event e where e.event_id = nvl((SELECT max(event_id) from contest_project_xref x, contest c where project_id = p.project_id and c.contest_id = x.contest_id), 0)) as event_name , technology_list(pi1.value) AS technology , platform_list(p.project_id) as platforms + , CASE WHEN (pp1.phase_status_id = 2) THEN 'Yes' ELSE 'No' END AS registration_open FROM project p , project_status_lu pstatus , project_phase pp1 --registration phase