Changeset 601 for trunk/grails-app/services
- Timestamp:
- Jun 20, 2010, 2:28:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskService.groovy
r592 r601 97 97 } 98 98 99 // Default status to "not started" if not supplied.100 params.taskStatus = params.taskStatus ?: TaskStatus.get(1)101 102 // Set budgetStatus.103 if(params.taskType?.id?.toLong() == 1 || params.taskType?.id?.toLong() == 2) // Immediate Callout or Unsheduled Breakin.104 params.taskBudgetStatus = params.taskBudgetStatus ?: TaskBudgetStatus.get(1) // Unplanned.105 else106 params.taskBudgetStatus = params.taskBudgetStatus ?: TaskBudgetStatus.get(2) // Planned.107 108 99 def taskInstance = new Task(params) 109 100 result.taskInstance = taskInstance 101 102 // Set taskStatus if not supplied. 103 if(!params.taskStatus) 104 taskInstance.taskStatus = TaskStatus.read(1) // Not Started 105 106 // Set budgetStatus if not supplied. 107 if(!params.taskBudgetStatus) { 108 if(taskInstance.taskType?.id == 1 || taskInstance.taskType?.id == 2) // Immediate Callout or Unsheduled Breakin. 109 taskInstance.taskBudgetStatus = TaskBudgetStatus.read(1) // Unplanned. 110 else 111 taskInstance.taskBudgetStatus = TaskBudgetStatus.read(2) // Planned. 112 } 110 113 111 114 if(result.taskInstance.parentTask?.trash)
Note: See TracChangeset
for help on using the changeset viewer.