Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -1251,19 +1251,18 @@ public static List<ProjectCopilotStatDTO> getDirectProjectCopilotStats(long dire
for (int i = 0; i < recordNum; i++) {
long copilotUserId = Long.valueOf(resultContainer.getStringItem(i, "copilot_user_id"));
long statusId = resultContainer.getLongItem(i, "status_id");
String status = resultContainer.getStringItem(i, "status");

ProjectCopilotStatDTO currentStat = helperMap.get(copilotUserId);

if (currentStat == null) {
continue;
}

if (status.toLowerCase().equals("draft") || statusId == 2L) {
if (statusId == 2L) {
// count the status id draft and status name draft
currentStat.setDraftContestsNumber(currentStat.getDraftContestsNumber() + 1);
continue;
} else if (status.toLowerCase().equals("completed")) {
} else if (statusId == 7L) {
// count the finished contests
currentStat.setFinishedContestsNumber(currentStat.getFinishedContestsNumber() + 1);
continue;
Expand All @@ -1272,7 +1271,7 @@ public static List<ProjectCopilotStatDTO> getDirectProjectCopilotStats(long dire
currentStat.setActiveContestsNumber(currentStat.getActiveContestsNumber() + 1);
continue;
} else if (statusId == 4L || statusId == 5L || statusId == 8L || statusId == 11L || statusId == 6L) {
// failed contests
// failed contests (9 and 10) does not count
currentStat.setFailuresContestsNumber(currentStat.getFailuresContestsNumber() + 1);
continue;
}
Expand Down