- Timestamp:
- Nov 10, 2009, 9:56:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r181 r185 4 4 class TaskDetailedController extends BaseController { 5 5 6 def authenticateService6 def personService 7 7 def dateUtilService 8 8 def taskService … … 29 29 { 30 30 def taskInstanceList = [] 31 def personInstance = Person.get(authenticateService.userDomain().id)31 def personInstance = personService.currentUser() 32 32 33 33 if(params.quickSearch == "searchMyTodays") { … … 39 39 taskInstanceList = taskSearchService.getInTheLastWeek(params) 40 40 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week." } 41 else { params.message = "No tasks found for t oday." }41 else { params.message = "No tasks found for the last week." } 42 42 } 43 43 else if(params.quickSearch == "searchMyInTheLastWeek") { 44 44 taskInstanceList = taskSearchService.getMyInTheLastWeek(params) 45 45 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week for ${personInstance.firstName} ${personInstance.lastName}." } 46 else { params.message = "No tasks found for t oday." }46 else { params.message = "No tasks found for the last week." } 47 47 } 48 48 else { … … 70 70 { 71 71 def taskInstanceList = [] 72 def personInstance = Person.get(authenticateService.userDomain().id)72 def personInstance = personService.currentUser() 73 73 74 74 if(params.quickSearch == "searchMyTodays") { … … 81 81 taskInstanceList = taskSearchService.getInTheLastWeek(params) 82 82 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week." } 83 else { params.message = "No tasks found for t oday." }83 else { params.message = "No tasks found for the last week." } 84 84 if(taskInstanceList.totalCount > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 85 85 } … … 87 87 taskInstanceList = taskSearchService.getMyInTheLastWeek(params) 88 88 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week for ${personInstance.firstName} ${personInstance.lastName}." } 89 else { params.message = "No tasks found for t oday." }89 else { params.message = "No tasks found for the last week." } 90 90 if(taskInstanceList.totalCount > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 91 91 } … … 117 117 { 118 118 def taskInstanceList = [] 119 def personInstance = Person.get(authenticateService.userDomain().id)119 def personInstance = personService.currentUser() 120 120 121 121 if(params.quickSearch == "budgetUnplanned") { … … 456 456 def taskInstance = new Task() 457 457 // Default leadPerson to current user. 458 taskInstance.leadPerson = Person.get(authenticateService.userDomain().id)458 taskInstance.leadPerson = personService.currentUser() 459 459 taskInstance.properties = params 460 460 return ['taskInstance':taskInstance]
Note: See TracChangeset
for help on using the changeset viewer.