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

Commit 0ca337f

Browse files
committed
Save Effort Estimate as hours and revert related db changes
1 parent bf6f9bd commit 0ca337f

File tree

15 files changed

+160
-150
lines changed

15 files changed

+160
-150
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* </p>
6868
*
6969
* <p>
70-
* Version 1.3.0 (Topcoder - Add effort days field)
70+
* Version 1.3.0 (Topcoder - Add effort hours field)
7171
* <ul>
7272
* <li>Add {@link #EFFORT_HOURS_ESTIMATE}</li>
7373
* </ul>
@@ -95,21 +95,21 @@ public class ProjectPropertyType implements Serializable {
9595

9696
/**
9797
* Represents key for Allow Stock Art property.
98-
*
98+
*
9999
* @since 1.2.1
100100
*/
101101
public static final String ALLOW_STOCK_ART_KEY = "Allow Stock Art";
102-
102+
103103
/**
104104
* Represents key for Viewable Submissions Flag property.
105-
*
105+
*
106106
* @since 1.2.1
107107
*/
108108
public static final String VIEWABLE_SUBMISSIONS_FLAG_KEY_STRING = "Viewable Submissions Flag";
109-
109+
110110
/**
111111
* Represents key for Viewable Submitters property.
112-
*
112+
*
113113
* @since 1.2.1
114114
*/
115115
public static final String VIEWABLE_SUBMITTERS_KEY = "Viewable Submitters";
@@ -184,7 +184,7 @@ public class ProjectPropertyType implements Serializable {
184184
*/
185185
public static final String BILLING_PROJECT_PROJECT_PROPERTY_KEY = "Billing Project";
186186

187-
187+
188188
/**
189189
* <p>
190190
* Represents the "confidentiality type" project property key
@@ -217,7 +217,7 @@ public class ProjectPropertyType implements Serializable {
217217
*
218218
*/
219219
public static final String PUBLIC_PROJECT_PROPERTY_KEY = "Public";
220-
220+
221221
/**
222222
* Represents the "Rated" project property key
223223
*
@@ -289,7 +289,7 @@ public class ProjectPropertyType implements Serializable {
289289
*/
290290
public static final String ROOT_CATALOG_ID_PROJECT_PROPERTY_KEY = "Root Catalog ID";
291291

292-
292+
293293
/**
294294
* Represents the "Approval Required" project property key
295295
*
@@ -338,13 +338,13 @@ public class ProjectPropertyType implements Serializable {
338338
*
339339
*/
340340
public static final String COPILOT_COST_PROJECT_PROPERTY_KEY = "Copilot Cost";
341-
341+
342342
/**
343343
* Represents the "Contest Fee Percentage" project property key
344344
*
345345
*/
346346
public static final String CONTEST_FEE_PERCENTAGE_PROJECT_PROPERTY_KEY = "Contest Fee Percentage";
347-
347+
348348
/**
349349
* Represents the "Review Feedback Flag" project property key
350350
*
@@ -372,7 +372,7 @@ public class ProjectPropertyType implements Serializable {
372372
*/
373373
public static final String ALLOW_MULTIPLE_SUBMISSIONS_PROPERTY_KEY = "Allow multiple submissions";
374374

375-
375+
376376
/**
377377
* Represents the "CloudSpokes CMC Task" project property key.
378378
*
@@ -437,9 +437,9 @@ public class ProjectPropertyType implements Serializable {
437437
public static final String REVIEW_TYPE_KEY = "Review Type";
438438

439439
/*
440-
* Represent "Effort Days Estimate" key
440+
* Represent "Effort Hours Estimate" key
441441
*/
442-
public static final String EFFORT_HOURS_ESTIMATE = "Effort Days Estimate";
442+
public static final String EFFORT_HOURS_ESTIMATE = "Effort Hours Estimate";
443443

444444
/**
445445
* Represents the id of this instance. Only values greater than zero is

services/client_project_entities_dao/src/java/main/com/topcoder/clients/dao/ejb3/ProjectDAOBean.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
* </p>
8383
*
8484
* <p>
85-
* Version 1.3 (TC - Add effort days field)
86-
* - Add enable effort days field for client
85+
* Version 1.3 (TC - Add effort hours field)
86+
* - Add enable effort hours field for client
8787
* </p>
8888
*
8989
* <p>
@@ -124,7 +124,7 @@ public class ProjectDAOBean extends GenericEJB3DAO<Project, Long> implements
124124
private static final String SELECT_PROJECT = "select p.project_id, p.name, p.po_box_number, p.description, "
125125
+ " p.active, p.sales_tax, p.payment_terms_id, p.modification_user, p.modification_date, "
126126
+ " p.creation_date, p.creation_user, p.is_deleted, "
127-
+ " cp.client_id, c.name as client_name, p.is_manual_prize_setting, c.code_name, c.enable_effort_days "
127+
+ " cp.client_id, c.name as client_name, p.is_manual_prize_setting, c.code_name, c.enable_effort_hours "
128128
+ " from project as p left join client_project as cp on p.project_id = cp.project_id left join client c "
129129
+ " on c.client_id = cp.client_id and (c.is_deleted = 0 or c.is_deleted is null) "
130130
+ " where p.active = 1 and p.start_date <= current and current <= p.end_date ";
@@ -135,7 +135,7 @@ public class ProjectDAOBean extends GenericEJB3DAO<Project, Long> implements
135135
private static final String SELECT_PROJECT_BY_CLIENT_ID = "select p.project_id, p.name, p.po_box_number, p.description, "
136136
+ " p.active, p.sales_tax, p.payment_terms_id, p.modification_user, p.modification_date, "
137137
+ " p.creation_date, p.creation_user, p.is_deleted, "
138-
+ " cp.client_id, c.name as client_name, p.is_manual_prize_setting, c.code_name, c.enable_effort_days "
138+
+ " cp.client_id, c.name as client_name, p.is_manual_prize_setting, c.code_name, c.enable_effort_hours "
139139
+ " from project as p, client_project as cp, client as c "
140140
+ " where p.start_date <= current and current <= p.end_date "
141141
+ " and c.client_id = cp.client_id and (p.is_deleted = 0 or p.is_deleted is null) "
@@ -154,8 +154,8 @@ public class ProjectDAOBean extends GenericEJB3DAO<Project, Long> implements
154154
+ " where p.start_date <= current and current <= p.end_date "
155155
+ " and c.client_id = cp.client_id and (p.is_deleted = 0 or p.is_deleted is null) "
156156
+ " and p.project_id = cp.project_id ";
157-
158-
157+
158+
159159
/**
160160
* The query string used to select project by project id.
161161
*
@@ -499,8 +499,8 @@ private List<Project> convertQueryToListProjects(Query query) {
499499
}
500500

501501
if (os[16] != null) {
502-
int enableEffortDays = Integer.parseInt(os[16].toString());
503-
client.setEnableEffortDays(enableEffortDays == 1 ? true : false);
502+
int enableEffortHours = Integer.parseInt(os[16].toString());
503+
client.setEnableEffortHours(enableEffortHours == 1 ? true : false);
504504
}
505505

506506
result.add(c);
@@ -957,13 +957,13 @@ public List<Project> getProjectsByIds(List<Long> projectIds) throws DAOException
957957
}
958958

959959
EntityManager entityManager = Helper.checkEntityManager(getEntityManager());
960-
960+
961961
StringBuilder projectIdsClause = new StringBuilder();
962-
962+
963963
projectIdsClause.append(" (");
964964

965965
boolean first = true;
966-
966+
967967
for(int i = 0; i < projectIds.size(); ++i) {
968968
if(projectIds.get(i) != null) {
969969

@@ -978,11 +978,11 @@ public List<Project> getProjectsByIds(List<Long> projectIds) throws DAOException
978978
}
979979

980980
projectIdsClause.append(")");
981-
982-
981+
982+
983983
try {
984984
String queryString = SELECT_PROJECTS_BY_IDS + projectIdsClause.toString();
985-
985+
986986
System.out.println(queryString);
987987

988988
Query query = entityManager.createNativeQuery(queryString);

services/client_project_entities_dao/src/java/main/com/topcoder/clients/model/Client.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,24 @@ public class Client extends AuditableEntity {
9595

9696
/**
9797
* <p>
98-
* This field represents the 'enableEffortDays' property of the Client.
98+
* This field represents the 'enableEffortHours' property of the Client.
9999
* </p>
100100
* <p>
101101
* It is default to the default value of this data type when it is not
102102
* assigned.
103103
* </p>
104104
* <p>
105105
* Through corresponding getter/setter methods. It is retrieved from
106-
* Client.enableEffortDays [Client.isEffortDaysEnabled()] and in table
107-
* client.enable_effort_days.
106+
* Client.enableEffortHours [Client.isEffortHoursEnabled()] and in table
107+
* client.enable_effort_hours.
108108
* </p>
109109
* <p>
110110
* There are no restrictions at this moment. It can take any value.
111111
* OPTIONAL.
112112
* </p>
113113
*/
114-
@Column(name = "enable_effort_days")
115-
private Boolean enableEffortDays;
114+
@Column(name = "enable_effort_hours")
115+
private Boolean enableEffortHours;
116116

117117
/**
118118
* <p>
@@ -377,21 +377,21 @@ public void setStartDate(Date startDate) {
377377
}
378378

379379
/**
380-
* Gets whether this client enabled effort days.
380+
* Gets whether this client enabled effort hours.
381381
*
382-
* @return whether this client enabled effort days.
382+
* @return whether this client enabled effort hours.
383383
*/
384-
public Boolean isEffortDaysEnabled() {
385-
return this.enableEffortDays;
384+
public Boolean isEffortHoursEnabled() {
385+
return this.enableEffortHours;
386386
}
387387

388388
/**
389-
* Sets whether this client enabled effort days.
389+
* Sets whether this client enabled effort hours.
390390
*
391-
* @param enableEffortDays
392-
* whether this client enabled effort days.
391+
* @param enableEffortHours
392+
* whether this client enabled effort hours.
393393
*/
394-
public void setEnableEffortDays(Boolean enableEffortDays) {
395-
this.enableEffortDays = enableEffortDays;
394+
public void setEnableEffortHours(Boolean enableEffortHours) {
395+
this.enableEffortHours = enableEffortHours;
396396
}
397397
}

0 commit comments

Comments
 (0)