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

Release dev to qa #423

Merged
merged 3 commits into from
May 13, 2015
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion actions/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -3670,7 +3670,8 @@ var getChallenges = function (api, connection, listType, isMyChallenges, next) {
}
}

sortOrder = query.sortorder || "desc";
sortOrder = query.sortorder ||
(!query.sortcolumn && (listType == api.helper.ListType.ACTIVE || listType == api.helper.ListType.UPCOMING) ? "asc" : "desc");
sortColumn = query.sortcolumn || DEFAULT_SORT_COLUMN;
pageIndex = Number(query.pageindex || 1);
pageSize = Number(query.pagesize || 150);
Expand Down
5 changes: 3 additions & 2 deletions initializers/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ var apiName2dbNameMap = {
currentphaseremainingtime: 'current_phase_remaining_time',
currentphasename: 'current_phase_name',
registrationopen: 'registration_open',
totalPrize: 'total_prize',
totalprize: 'total_prize',
registrationstartdate: 'registration_start_date',
challengecommunity: 'challenge_community',
problemid: 'problem_id',
Expand All @@ -280,7 +280,8 @@ var apiName2dbNameMap = {
challengestarttime: "challenge_start_time",
challengeendtime: "challenge_end_time",
systeststarttime: "systest_start_time",
systestendtime: "systest_end_time"
systestendtime: "systest_end_time",
firstplaceprize: "first_place_prize"
};

/**
Expand Down
4 changes: 3 additions & 1 deletion queries/get_active_challenges
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
SELECT
SKIP @first_row_index@
FIRST @page_size@
CASE WHEN (p.project_studio_spec_id IS NOT NULL) THEN 1 ELSE 0 END AS is_studio
, pcl.description AS challenge_type
, pn.value AS challenge_name
Expand Down Expand Up @@ -71,4 +73,4 @@ AND pp1.phase_status_id IN (2, 3)
AND pi1.project_info_type_id = 1 -- external reference id
AND pi1.project_id = p.project_id

ORDER BY NVL(pp2.actual_end_time, pp2.scheduled_end_time) ASC
ORDER BY @sort_column@ @sort_order@
2 changes: 1 addition & 1 deletion queries/get_upcoming_challenges
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ AND pp1.scheduled_start_time < CURRENT + 90 UNITS DAY
AND pi1.project_info_type_id = 1 -- external reference id
AND pi1.project_id = p.project_id

ORDER BY pp2.scheduled_end_time ASC
ORDER BY @sort_column@ @sort_order@