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

Commit bfad61a

Browse files
committed
Merge branch 'technology-2014-10-09'
2 parents 1d4ebfd + a5ff6aa commit bfad61a

File tree

22 files changed

+176
-28
lines changed

22 files changed

+176
-28
lines changed

components/project_management/src/java/main/com/topcoder/management/project/Project.java

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
* </p>
8484
*
8585
* @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin
86-
* @version 1.8
86+
* @version 1.9
8787
* @since 1.0
8888
*/
8989
@XmlType(name = "project", namespace = "com.topcoder.management.project")
@@ -194,6 +194,13 @@ public class Project extends AuditableObject implements Serializable {
194194
*/
195195
private String tcDirectProjectName;
196196

197+
/**
198+
* The creator
199+
*
200+
* @since
201+
*/
202+
private String creator;
203+
197204
/**
198205
* whether it is dev only
199206
*/
@@ -765,4 +772,25 @@ public long getAutoAssignReviewerId() {
765772
public void setAutoAssignReviewerId(long autoAssignReviewerId) {
766773
this.autoAssignReviewerId = autoAssignReviewerId;
767774
}
775+
776+
/**
777+
* Gets the creator
778+
*
779+
* @return the creator
780+
* @since 1.9
781+
*/
782+
public String getCreator() {
783+
return this.creator;
784+
}
785+
786+
787+
/**
788+
* Sets creator
789+
*
790+
* @param creator
791+
* @since 1.9
792+
*/
793+
public void setCreator(String creator) {
794+
this.creator = creator;
795+
}
768796
}

components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ public abstract class AbstractInformixProjectPersistence implements ProjectPersi
459459
*
460460
* @since 1.1.2
461461
*/
462-
public static final long PUBLIC_SUBMITTER_TERMS_ID = 20703;
462+
public static final long PUBLIC_SUBMITTER_TERMS_ID = 21173;
463463

464464
/**
465465
* <p>
@@ -1458,13 +1458,15 @@ public abstract class AbstractInformixProjectPersistence implements ProjectPersi
14581458
+ "project.project_id, status.project_status_id, status.name,"
14591459
+ "category.project_category_id, category.name, type.project_type_id, type.name,"
14601460
+ "project.create_user, project.create_date, project.modify_user, project.modify_date, category.description, "
1461-
+ "project.tc_direct_project_id "
1461+
+ "project.tc_direct_project_id, u.handle "
14621462
+ "FROM project JOIN project_status_lu AS status "
14631463
+ "ON project.project_status_id=status.project_status_id "
14641464
+ "JOIN project_category_lu AS category "
14651465
+ "ON project.project_category_id=category.project_category_id "
14661466
+ "JOIN project_type_lu AS type "
14671467
+ "ON category.project_type_id=type.project_type_id "
1468+
+ "JOIN user AS u "
1469+
+ "ON u.user_id=project.create_user "
14681470
+ "WHERE project.project_id IN ";
14691471

14701472
/**
@@ -1476,7 +1478,7 @@ public abstract class AbstractInformixProjectPersistence implements ProjectPersi
14761478
private static final DataType[] QUERY_PROJECTS_COLUMN_TYPES = new DataType[]{Helper.LONG_TYPE, Helper.LONG_TYPE,
14771479
Helper.STRING_TYPE, Helper.LONG_TYPE, Helper.STRING_TYPE, Helper.LONG_TYPE, Helper.STRING_TYPE,
14781480
Helper.STRING_TYPE, Helper.DATE_TYPE, Helper.STRING_TYPE, Helper.DATE_TYPE, Helper.STRING_TYPE,
1479-
Helper.LONG_TYPE};
1481+
Helper.LONG_TYPE, Helper.STRING_TYPE};
14801482
private static final String QUERY_PROJECTS_BY_CREATE_DATE_SQL = "SELECT "
14811483

14821484
+ " project.project_id, project_status_lu.project_status_id, project_status_lu.name, "
@@ -5789,6 +5791,10 @@ private Project[] getProjects(long ids[], Connection conn)
57895791

57905792
// set the tc direct project id
57915793
projects[i].setTcDirectProjectId(row[12] == null ? 0 : ((Long) row[12]).intValue());
5794+
5795+
//creator
5796+
projects[i].setCreator((String) row[13]);
5797+
57925798
// set the file types
57935799
projects[i].setProjectFileTypes(Arrays.asList(getProjectFileTypes(projectId)));
57945800

conf/ApplicationServer.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ DEV=3
77
ENVIRONMENT=@ApplicationServer.ENVIRONMENT@
88
SERVER_NAME=@ApplicationServer.SERVER_NAME@
99
NEW_SERVER_NAME=@ApplicationServer.NEW_SERVER_NAME@
10+
NEW_COMMUNITY_SERVER_NAME=@ApplicationServer.NEW_COMMUNITY_SERVER_NAME@
1011
JIRA_SERVER_NAME=@ApplicationServer.JIRA_SERVER_NAME@
1112
STUDIO_SERVER_NAME=@ApplicationServer.STUDIO_SERVER_NAME@
1213
OPENAIM_SERVER_NAME=@ApplicationServer.OPENAIM_SERVER_NAME@

conf/email_templates/activate_contest_receipt.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ We have scheduled your competition. The contest will now undergo a specificatio
99
</p>
1010

1111
<p>
12-
You can track the status of this competition, and all your competitions, by visiting http\://www.topcoder.com/direct
12+
You can track the status of this competition by visiting <a href\="%COMPETITION_URL%">%COMPETITION_URL%</a>
13+
</p>
14+
15+
<p>
16+
You can track the status of all your competitions, by visiting <a href\="https\://www.topcoder.com/direct">https\://www.topcoder.com/direct</a>
1317
</p>
1418

1519
<p>

conf/email_templates/activate_copilot_posting_receipt.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ will be able to review all of the Copilots and their submissions, and then choos
1111
</p>
1212

1313
<p>
14-
You can track the status of this competition, and all your competitions, by visiting https\://www.topcoder.com/direct
14+
You can track the status of this competition by visiting <a href\="%COMPETITION_URL%">%COMPETITION_URL%</a>
15+
</p>
16+
17+
<p>
18+
You can track the status of all your competitions, by visiting <a href\="https\://www.topcoder.com/direct">https\://www.topcoder.com/direct</a>
1519
</p>
1620

1721
<p>

lib/tcs/shared.jar

0 Bytes
Binary file not shown.

services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ejb/ContestServiceFacadeBean.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
import com.topcoder.shared.dataAccess.DataAccess;
142142
import com.topcoder.shared.dataAccess.Request;
143143
import com.topcoder.shared.dataAccess.resultSet.ResultSetContainer;
144+
import com.topcoder.shared.util.ApplicationServer;
144145
import com.topcoder.shared.util.DBMS;
145146
import com.topcoder.util.config.ConfigManager;
146147
import com.topcoder.util.config.ConfigManagerException;
@@ -2477,7 +2478,7 @@ else if (paymentData instanceof CreditCardPaymentData) {
24772478
projectName,
24782479
competition.getAssetDTO().getProductionDate()
24792480
.toGregorianCalendar().getTime(), totalMemberCost, totalCost,
2480-
result.getReferenceNumber(), hasContestSaleData, contestIndicator);
2481+
result.getReferenceNumber(), hasContestSaleData, contestIndicator, isStudio(competition), competition.getProjectHeader().getId());
24812482

24822483
// publish event to AWS SNS if needed
24832484
try {
@@ -5704,12 +5705,13 @@ private void rethrowEmailError(Throwable e, boolean messageGenerated)
57045705
private void sendActivateContestReceiptEmail(String toAddr,
57055706
String purchasedBy, PaymentData paymentData, String competitionType, long competitionTypeId,
57065707
String competitionTitle, String projectName, Date launchTime,
5707-
Double price, Double totalCost, String orderNumber, boolean hasContestSaleData, String contestIndicator)
5708+
Double price, Double totalCost, String orderNumber, boolean hasContestSaleData, String contestIndicator,
5709+
boolean isDesign, long challengeId)
57085710
throws EmailMessageGenerationException, EmailSendingException {
57095711
com.topcoder.project.phases.Phase phase = new com.topcoder.project.phases.Phase();
57105712

57115713
setReceiptEmailCommonProperties(phase, purchasedBy, paymentData,
5712-
competitionType, competitionTitle, projectName);
5714+
competitionType, competitionTitle, projectName, isDesign, challengeId);
57135715

57145716
phase.setAttribute("LAUNCH_TIME", launchTime);
57155717
phase.setAttribute("CONTEST_COST", price);
@@ -5807,7 +5809,7 @@ private void sendCopilotWinnerEmail(long copilotUserId, ProjectData project, Sof
58075809
private void setReceiptEmailCommonProperties(
58085810
com.topcoder.project.phases.Phase phase, String purchasedBy,
58095811
PaymentData paymentData, String competitionType,
5810-
String competitionTitle, String projectName) {
5812+
String competitionTitle, String projectName, boolean isDesign, long challengeId) {
58115813
// TODO: keep the commented portion, once if/else start working in
58125814
// document generator we should switch to it.
58135815
StringBuffer sb = new StringBuffer();
@@ -5856,6 +5858,12 @@ private void setReceiptEmailCommonProperties(
58565858
phase.setAttribute("COMPETITION_TYPE", competitionType);
58575859
phase.setAttribute("COMPETITION_TITLE", competitionTitle);
58585860
phase.setAttribute("PROJECT_NAME", projectName);
5861+
5862+
if (isDesign) {
5863+
phase.setAttribute("COMPETITION_URL", "http://" + ApplicationServer.NEW_COMMUNITY_SERVER_NAME + "/challenge-details/" + challengeId + "/?type=design");
5864+
} else {
5865+
phase.setAttribute("COMPETITION_URL", "http://" + ApplicationServer.NEW_COMMUNITY_SERVER_NAME + "/challenge-details/" + challengeId + "/?type=develop");
5866+
}
58595867
}
58605868

58615869
/**

services/project_services/src/java/main/com/topcoder/project/service/impl/ProjectServicesImpl.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,10 @@ public FullProjectData updateProject(Project projectHeader, String projectHeader
21492149
projectHeader.getAutoAssignReviewerId() > 0 && p.getPhaseType().getId() == PhaseType.REVIEW_PHASE.getId()) {
21502150
// code with auto assigned review only requires one reviewer.
21512151
p.setAttribute("Reviewer Number", "1");
2152+
} else if (projectHeader.getProjectCategory().getId() == ProjectCategory.CODE.getId() &&
2153+
projectHeader.getAutoAssignReviewerId() == 0 && p.getPhaseType().getId() == PhaseType.REVIEW_PHASE.getId()) {
2154+
// code with auto assigned review only requires one reviewer.
2155+
p.setAttribute("Reviewer Number", "2");
21522156
}
21532157
}
21542158
}
@@ -5357,14 +5361,15 @@ else if (p.getPhaseType().getName().equals("Review"))
53575361
) {
53585362
// 1) copilot posting 2) studio 3) bug hunt 4) code with auto assigned review only requires one reviewer.
53595363
p.setAttribute("Reviewer Number", "1");
5364+
} else if(projectHeader.getProjectCategory().getId() == ProjectCategory.CODE.getId() &&
5365+
projectHeader.getAutoAssignReviewerId() == 0) {
5366+
p.setAttribute("Reviewer Number", "2");
53605367
} else {
53615368
p.setAttribute("Reviewer Number", "3");
53625369
}
53635370

53645371

5365-
if(projectHeader.getProjectCategory().getId() == ProjectCategory.CODE.getId()) {
5366-
p.setAttribute("Reviewer Number", "2");
5367-
}
5372+
53685373
}
53695374
else if (p.getPhaseType().getName().equals("Secondary Reviewer Review"))
53705375
{

src/java/main/com/topcoder/direct/services/view/action/my/MyChallengesAction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public String execute() throws Exception {
6767
SORTING_MAP.put(5, "challengestatus");
6868
SORTING_MAP.put(6, "challengestartdate");
6969
SORTING_MAP.put(7, "challengeenddate");
70+
SORTING_MAP.put(8, "challengecreator");
7071
}
7172

7273

@@ -141,6 +142,8 @@ public String getMyChallenges() {
141142
// <th>Challenge End Date</th>
142143
challengeData.add(challengeDateFormat.format(c.getChallengeEndDate()));
143144

145+
challengeData.add(c.getChallengeCreator());
146+
144147
// <th>Total Prize</th>
145148

146149
challengeData.add(NumberFormat.getCurrencyInstance(Locale.US).format(c.getTotalPrize()));

src/java/main/com/topcoder/direct/services/view/action/my/MyCreatedChallengesAction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public String execute() throws Exception {
7575
SORTING_MAP.put(5, "challengestatus");
7676
SORTING_MAP.put(6, "challengestartdate");
7777
SORTING_MAP.put(7, "challengeenddate");
78+
SORTING_MAP.put(8, "challengecreator");
7879
}
7980

8081

@@ -151,6 +152,8 @@ public String getMyCreatedChallenges() {
151152
// <th>Challenge End Date</th>
152153
challengeData.add(challengeDateFormat.format(c.getChallengeEndDate()));
153154

155+
challengeData.add(c.getChallengeCreator());
156+
154157
// <th>Total Prize</th>
155158

156159
challengeData.add(NumberFormat.getCurrencyInstance(Locale.US).format(c.getTotalPrize()));

0 commit comments

Comments
 (0)