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

Commit 0b82056

Browse files
committed
enable null value for Client effortHours
1 parent a13e8bc commit 0b82056

File tree

2 files changed

+5
-5
lines changed
  • services/client_project_entities_dao/src/java/main/com/topcoder/clients/model
  • src/java/main/com/topcoder/direct/services/view/action/contest/launch

2 files changed

+5
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public class Client extends AuditableEntity {
111111
* OPTIONAL.
112112
* </p>
113113
*/
114-
@Column(name = "enable_effort_hours")
115-
private boolean enableEffortHours;
114+
@Column(name = "enable_effort_hours", nullable = true)
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/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)