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

Commit bf4876b

Browse files
committed
merge with latest dev
2 parents c15b4ef + ab1830d commit bf4876b

File tree

16 files changed

+170
-1523
lines changed

16 files changed

+170
-1523
lines changed

LOCAL_SETUP.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

components/online_review_upload_services/src/java/main/com/cronos/onlinereview/services/uploads/impl/DefaultUploadServices.java

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,17 @@
113113
* change the other variables.
114114
* </p>
115115
*
116+
* Version 1.1.4 (TOPCODER DIRECT - FIXES FOR CLOSE PRIVATE CHALLENGE IMMEDIATELY):
117+
* <ol>
118+
* <li>Added {@link #isProjectResultCategory(long)} method</li>
119+
* </ol>
120+
* </p>
121+
* <p>
122+
* Thread safety: the thread safety is completely relied to the managers implementations because it's impossible to
123+
* change the other variables.
124+
* </p>
116125
* @author fabrizyo, saarixx, cyberjag, TCSDEVELOPER
117-
* @version 1.1.3
126+
* @version 1.1.4
118127
*/
119128
public class DefaultUploadServices implements UploadServices {
120129

@@ -1627,6 +1636,39 @@ public Resource addPrimaryScreener(long projectId, long userId) throws UploadSer
16271636
}
16281637
}
16291638

1639+
/**
1640+
* Lookup function for project categories that should have a project_result row. These rows are used
1641+
* for ratings, reliability, and the Digital Run.
1642+
*
1643+
* Copied from online_review: com/cronos/onlinereview/util/ActionsHelper.java#L205
1644+
*
1645+
* @param categoryId the category id to look up.
1646+
* @return whether the provided category id should have a project_result row.
1647+
* @since 1.1.4
1648+
*/
1649+
private static boolean isProjectResultCategory(long categoryId) {
1650+
return (categoryId == 1 // Component Design
1651+
|| categoryId == 2 // Component Development
1652+
|| categoryId == 5 // Component Testing
1653+
|| categoryId == 6 // Application Specification
1654+
|| categoryId == 7 // Application Architecture
1655+
|| categoryId == 9 // Bug Hunt
1656+
|| categoryId == 13 // Test Scenarios
1657+
|| categoryId == 26 // Test Suites
1658+
|| categoryId == 14 // Application Assembly
1659+
|| categoryId == 23 // Application Conceptualization
1660+
|| categoryId == 19 // UI Prototype
1661+
|| categoryId == 24 // RIA Build
1662+
|| categoryId == 25 // RIA Component
1663+
|| categoryId == 29 // Copilot Posting
1664+
|| categoryId == 35 // Content Creation
1665+
|| categoryId == 36 // Reporting
1666+
|| categoryId == 38 // First2Finish
1667+
|| categoryId == 39 // Code
1668+
|| categoryId == 40 // Design F2F (NEW)
1669+
);
1670+
}
1671+
16301672
/**
16311673
* Populate project_result and component_inquiry for new submitters.
16321674
*
@@ -1644,9 +1686,8 @@ private void populateProjectResult(Project project, Collection newSubmitters) th
16441686
PreparedStatement ratingStmt = null;
16451687
PreparedStatement componentInquiryStmt = null;
16461688
long categoryId = project.getProjectCategory().getId();
1647-
// Only design/development/assembly will modify the project result table.
1648-
if (categoryId != 1 && categoryId != 2 && categoryId != 14) {
1649-
// design/development/assembly project need project_result
1689+
1690+
if (!isProjectResultCategory(categoryId)) {
16501691
return;
16511692
}
16521693
LOG.log(Level.INFO, "Populating the project result table.");

docker/local-setup/direct-app-base/Dockerfile

Lines changed: 0 additions & 61 deletions
This file was deleted.
-1.61 MB
Binary file not shown.

0 commit comments

Comments
 (0)