diff --git a/.deploy/circleci/token.properties b/.deploy/circleci/token.properties index e918f77e4a..a3747387e8 100644 --- a/.deploy/circleci/token.properties +++ b/.deploy/circleci/token.properties @@ -12,7 +12,7 @@ database.password=1nf0rm1x database.INFORMIXSERVER=informixoltp_tcp database.locale=en_us.utf8 -# context.security.url - URL for JNDI lookup +# context.security.url - URL for JNDI lookup context.security.url=localhost:11199 ## Used by cache.properties @@ -35,7 +35,7 @@ WINFORMULA_SERVER_NAME=tc.cloud.topcoder.com/winformula CSF_SERVER_NAME=csf.dev.topcoder.com CORP_SERVER_NAME=tc.cloud.topcoder.com/corp SOFTWARE_SERVER_NAME=tcs.cloud.topcoder.com -FORUMS_SERVER_NAME=forums.dev.topcoder.com +FORUMS_SERVER_NAME=vanilla.topcoder-dev.com HOST_URL=localhost:11199 FORUMS_HOST_URL=jnp://localhost:1199 CONTEST_HOST_URL=63.118.154.180:10099 diff --git a/scripts/auto_pilot/ApplicationServer.properties b/scripts/auto_pilot/ApplicationServer.properties index 94cacb4720..ca1d01c93f 100644 --- a/scripts/auto_pilot/ApplicationServer.properties +++ b/scripts/auto_pilot/ApplicationServer.properties @@ -15,7 +15,7 @@ WINFORMULA_SERVER_NAME=tc.cloud.topcoder.com/winformula CSF_SERVER_NAME=csf.dev.topcoder.com CORP_SERVER_NAME=tc.cloud.topcoder.com/corp SOFTWARE_SERVER_NAME=tcs.cloud.topcoder.com -FORUMS_SERVER_NAME=forums.dev.topcoder.com +FORUMS_SERVER_NAME=vanilla.topcoder-dev.com HOST_URL=localhost:11199 FORUMS_HOST_URL=localhost:1199 CONTEST_HOST_URL=63.118.154.180:10099 diff --git a/src/main/java/com/cronos/onlinereview/model/PhaseGroup.java b/src/main/java/com/cronos/onlinereview/model/PhaseGroup.java index 040d2ff3b9..74b104bc16 100644 --- a/src/main/java/com/cronos/onlinereview/model/PhaseGroup.java +++ b/src/main/java/com/cronos/onlinereview/model/PhaseGroup.java @@ -1376,6 +1376,9 @@ public Submission getIterativeReviewSubmission() { * @param iterativeReviewSubmission a Submission providing the details on iterative review submission. */ public void setIterativeReviewSubmission(Submission iterativeReviewSubmission) { + if (iterativeReviewSubmission == null) { + return; + } this.iterativeReviewSubmission = iterativeReviewSubmission; Upload upload = iterativeReviewSubmission.getUpload(); this.iterativeReadyToDownload = upload == null || upload.getUrl() == null || !ActionsHelper.isDmzBucket(upload.getUrl()); diff --git a/src/main/java/com/cronos/onlinereview/util/ConfigHelper.java b/src/main/java/com/cronos/onlinereview/util/ConfigHelper.java index 530763ac25..d54c89c2d1 100644 --- a/src/main/java/com/cronos/onlinereview/util/ConfigHelper.java +++ b/src/main/java/com/cronos/onlinereview/util/ConfigHelper.java @@ -588,6 +588,11 @@ public class ConfigHelper { */ private static final String VALID_ISSUERS = "valid_issuers"; + /** + *

A String providing the name for challenge by legacy id v5 url property.

+ */ + private static final String CHALLENGE_BY_LEGACY_ID_URL_V5 = "challenge_by_legacy_id_url_v5"; + /** * This member variable holds the submitter role id. */ @@ -1053,12 +1058,17 @@ public class ConfigHelper { * JWT default expiration time (1 day) */ private static final int DEFAULT_EXPIRATION_TIME = 60 * 24; - + /** * New Auth URL for Iframe to refresh the RS256 token */ private static String newAuthUrl; + /** + * Challenge by Legacy Id URL + */ + private static String challengeByLegacyIdUrlV5; + static { // Obtaining the instance of Configuration Manager ConfigManager cfgMgr = new ConfigManager(); @@ -1681,10 +1691,11 @@ public class ConfigHelper { } catch (Exception e) { preSignedExpTimeMilis = 60 * 60 * 1000; } - + ConfigManager.Property newAuth = cfgMgr.getPropertyObject(ONLINE_REVIEW_CFG_NS, "new_auth"); newAuthUrl = newAuth.getValue("new_auth_url"); + challengeByLegacyIdUrlV5 = cfgMgr.getString(ONLINE_REVIEW_CFG_NS, CHALLENGE_BY_LEGACY_ID_URL_V5); } catch (Exception une) { System.out.println(une.getMessage()); une.printStackTrace(); @@ -2559,12 +2570,20 @@ public static String getS3BucketDmz() { public static long getPreSignedExpTimeMilis() { return preSignedExpTimeMilis; } - + /** - * Get new auth url - * @return url + * Get new auth url + * @return url */ public static String getNewAuthUrl() { return newAuthUrl; } + + /** + * Get challenge by legacy id url + * @return url + */ + public static String getChallengeByLegacyIdUrlV5() { + return challengeByLegacyIdUrlV5; + } } diff --git a/src/main/java/com/cronos/onlinereview/util/PhasesDetailsServices.java b/src/main/java/com/cronos/onlinereview/util/PhasesDetailsServices.java index 166dc2ba1b..a158c19dd4 100644 --- a/src/main/java/com/cronos/onlinereview/util/PhasesDetailsServices.java +++ b/src/main/java/com/cronos/onlinereview/util/PhasesDetailsServices.java @@ -1139,22 +1139,24 @@ private static void serviceIterativeReviewsAppFunc(HttpServletRequest request, P throw new BaseException("Unable to find the Submitter resource " + "associated with the current user for project " + project.getId()); } - - Submission[] mySubmissions = ActionsHelper.getResourceSubmissions(myResource.getId(), - Constants.CONTEST_SUBMISSION_TYPE_NAME, null, false); - if (mySubmissions != null) { - for (Submission submission : mySubmissions) { - if (submission.getId() == associatedSubmission.getId()) { - phaseGroup.setIterativeReviewSubmission(associatedSubmission); + if (associatedSubmission != null) { + Submission[] mySubmissions = ActionsHelper.getResourceSubmissions(myResource.getId(), + Constants.CONTEST_SUBMISSION_TYPE_NAME, null, false); + if (mySubmissions != null) { + for (Submission submission : mySubmissions) { + if (submission.getId() == associatedSubmission.getId()) { + phaseGroup.setIterativeReviewSubmission(associatedSubmission); + } } } } } - - for (Resource resource : allProjectResources) { - if (resource.getId() == associatedSubmission.getUpload().getOwner()) { - phaseGroup.setIterativeReviewSubmitter(resource); - break; + if (associatedSubmission != null) { + for (Resource resource : allProjectResources) { + if (resource.getId() == associatedSubmission.getUpload().getOwner()) { + phaseGroup.setIterativeReviewSubmitter(resource); + break; + } } } diff --git a/src/main/resources/config.xml b/src/main/resources/config.xml index c3f8ca7bb1..c891448101 100644 --- a/src/main/resources/config.xml +++ b/src/main/resources/config.xml @@ -2092,4 +2092,7 @@ 1 + + @topcoder_api_base_url_v5@/challenges?legacyId= + \ No newline at end of file diff --git a/token.properties.local b/token.properties.local index 23f1ed3024..1d24e3169f 100644 --- a/token.properties.local +++ b/token.properties.local @@ -73,8 +73,8 @@ AOLICQ_SERVER_NAME=63.118.154.179 WINFORMULA_SERVER_NAME=tc.cloud.topcoder.com/winformula CSF_SERVER_NAME=csf.dev.topcoder.com CORP_SERVER_NAME=www.topcoder-dev.com/corp -SOFTWARE_SERVER_NAME=local.topcoder-dev.com:8443 -FORUMS_SERVER_NAME=forums.dev.topcoder.com +SOFTWARE_SERVER_NAME=local.topcoder-dev.com:8080 +FORUMS_SERVER_NAME=vanilla.topcoder-dev.com HOST_URL=localhost:1099 FORUMS_HOST_URL=jnp://localhost:1099 CONTEST_HOST_URL=63.118.154.180:10099 @@ -115,7 +115,7 @@ DOMAIN_AUTH0 = topcoder-dev.auth0.com #CSF_SERVER_NAME=csf.dev.topcoder.com #CORP_SERVER_NAME=tc.cloud.topcoder.com/corp #SOFTWARE_SERVER_NAME=tcs.cloud.topcoder.com -#FORUMS_SERVER_NAME=forums.dev.topcoder.com +#FORUMS_SERVER_NAME=vanilla.topcoder-dev.com #HOST_URL=localhost:11199 #FORUMS_HOST_URL=jnp://localhost:1199 #CONTEST_HOST_URL=63.118.154.180:10099 diff --git a/web/includes/project/project_info.jsp b/web/includes/project/project_info.jsp index 02afc6f2b3..80621c1586 100644 --- a/web/includes/project/project_info.jsp +++ b/web/includes/project/project_info.jsp @@ -36,7 +36,7 @@ | - diff --git a/web/includes/project/project_phase.jsp b/web/includes/project/project_phase.jsp index 14810aa182..b383fb6442 100644 --- a/web/includes/project/project_phase.jsp +++ b/web/includes/project/project_phase.jsp @@ -113,6 +113,7 @@ + @@ -130,73 +131,74 @@ - + + - - <or:text key='viewProjectDetails.box.Submission.icoShowMore.alt' /> - - - - - - - + + <or:text key='viewProjectDetails.box.Submission.icoShowMore.alt' /> + + + + + + + + + + + + + <or:text key='viewProjectDetails.Submitter.icoWinner.alt' /> + + + <or:text key='viewProjectDetails.Submitter.icoRunnerUp.alt' /> + + + ${placement} Place + + + + + + + <or:text key='${failureKeyName}' /> - - - - - <or:text key='viewProjectDetails.Submitter.icoWinner.alt' /> - - - <or:text key='viewProjectDetails.Submitter.icoRunnerUp.alt' /> - - - ${placement} Place - - + + + ${placeStr} - - - - <or:text key='${failureKeyName}' /> + + + + + ${submission.id} - - - ${placeStr} + + ${submission.id} - - - - ${submission.id} - - - ${submission.id} - - - - - + + + ${submission.id} - - - ${submission.id} - - - () + + ${submission.id} - - ${submission.id} - - () - + + () + + + ${submission.id} + + () + + <%-- @@ -204,19 +206,19 @@ --%> - + <%-- --%> ${orfn:displayDate(pageContext.request, submission.upload.creationTimestamp)} - - - - - - + + + + + + @@ -243,8 +245,8 @@ - + @@ -255,33 +257,33 @@ - ${orfn:displayScore(pageContext.request, review.score)} + ${orfn:displayScore(pageContext.request, review.score)} ${orfn:displayScore(pageContext.request, review.score)} - - - - - - - - - () - + + + + + + - - + + () + + + + - + @@ -289,7 +291,9 @@ - + + + @@ -1463,4 +1467,4 @@ return false; } //--> - \ No newline at end of file + diff --git a/web/jsp/viewProjectDetails.jsp b/web/jsp/viewProjectDetails.jsp index a70a0d609f..30b4b51a27 100644 --- a/web/jsp/viewProjectDetails.jsp +++ b/web/jsp/viewProjectDetails.jsp @@ -7,6 +7,7 @@ --%> <%@ page contentType="text/html;charset=UTF-8" %> <%@ page language="java" isELIgnored="false" %> +<%@ page import="java.text.DecimalFormat,com.topcoder.onlinereview.component.webcommon.ApplicationServer" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="s" uri="/struts-tags" %> @@ -77,17 +78,36 @@ ); } +
- +
- + - +

@@ -115,7 +135,7 @@
- +