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

Commit a6ca0b9

Browse files
authored
Merge pull request #430 from deedee/dev
enable null value for Client effortHours
2 parents a13e8bc + c7ec66c commit a6ca0b9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public class Client extends AuditableEntity {
112112
* </p>
113113
*/
114114
@Column(name = "enable_effort_hours")
115-
private boolean enableEffortHours;
115+
private Boolean enableEffortHours;
116116

117117
/**
118118
* <p>
@@ -381,7 +381,7 @@ public void setStartDate(Date startDate) {
381381
*
382382
* @return whether this client enabled effort hours.
383383
*/
384-
public boolean isEffortHoursEnabled() {
384+
public Boolean isEffortHoursEnabled() {
385385
return this.enableEffortHours;
386386
}
387387

@@ -391,7 +391,7 @@ public boolean isEffortHoursEnabled() {
391391
* @param enableEffortHours
392392
* whether this client enabled effort hours.
393393
*/
394-
public void setEnableEffortHours(boolean enableEffortHours) {
394+
public void setEnableEffortHours(Boolean enableEffortHours) {
395395
this.enableEffortHours = enableEffortHours;
396396
}
397397
}

src/java/main/com/topcoder/direct/services/view/action/contest/launch/CommonAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public String getBillingAccountsForProject() {
399399
billingAccount.put("cca", String.valueOf(requireCCAs[i]));
400400
// Add enableEffortHours for each billing account
401401
Client client = billingAccountsByProject.get(i).getClient();
402-
if (client != null) {
402+
if (client != null && client.isEffortHoursEnabled() != null) {
403403
billingAccount.put("enableEffortHours", client.isEffortHoursEnabled());
404404
} else {
405405
billingAccount.put("enableEffortHours", false);

src/java/main/com/topcoder/direct/services/view/action/contest/launch/GetContestAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ protected void executeAction() throws Exception {
571571
billingAccount.put("cca", String.valueOf(requireCCAs[i]));
572572
// Add enableEffortHours for each billing account
573573
Client client = billingProjects.get(i).getClient();
574-
if (client != null) {
574+
if (client != null && client.isEffortHoursEnabled() != null) {
575575
billingAccount.put("enableEffortHours", client.isEffortHoursEnabled());
576576
} else {
577577
billingAccount.put("enableEffortHours", false);

0 commit comments

Comments
 (0)