Changeset 529 for trunk/grails-app
- Timestamp:
- May 10, 2010, 8:30:25 AM (15 years ago)
- Location:
- trunk/grails-app/services
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r523 r529 845 845 targetStartDate: dateUtilService.tomorrow, 846 846 targetCompletionDate: dateUtilService.tomorrow, 847 parentTask: Task. get(1)]847 parentTask: Task.list()[0]] 848 848 849 849 taskResult = taskService.save(p) … … 858 858 targetStartDate: dateUtilService.yesterday, 859 859 targetCompletionDate: dateUtilService.yesterday, 860 parentTask: Task. get(1)]860 parentTask: Task.list()[0]] 861 861 862 862 taskResult = taskService.save(p) … … 871 871 targetStartDate: dateUtilService.today, 872 872 targetCompletionDate: dateUtilService.oneWeekFromNow, 873 parentTask: Task. get(1)]873 parentTask: Task.list()[0]] 874 874 875 875 taskResult = taskService.save(p) … … 927 927 928 928 //Entry #1 929 p = [task: Task. get(1),929 p = [task: Task.list()[0], 930 930 entryType: EntryType.get(1), 931 931 comment: "This level sensor is causing us trouble.", … … 935 935 936 936 //Entry #2 937 p = [task: Task. get(1),937 p = [task: Task.list()[0], 938 938 entryType: EntryType.get(3), 939 939 comment: "Cleaned sensor, see how it goes.", … … 943 943 944 944 //Entry #3 945 p = [task: Task. get(1),945 p = [task: Task.list()[0], 946 946 entryType: EntryType.get(3), 947 947 comment: "Checked up on it later and sensor is dropping out intermittently, created sub task to replace sensor.", … … 958 958 //AssignedGroup #1 959 959 p = [personGroup: PersonGroup.get(1), 960 task: Task. get(1),960 task: Task.list()[0], 961 961 estimatedHour: 2, 962 962 estimatedMinute: 30] … … 965 965 //AssignedGroup #2 966 966 p = [personGroup: PersonGroup.get(2), 967 task: Task. get(1),967 task: Task.list()[0], 968 968 estimatedHour: 1, 969 969 estimatedMinute: 0] … … 978 978 //AssignedPerson #1 979 979 p = [person: Person.get(4), 980 task: Task. get(1),980 task: Task.list()[0], 981 981 estimatedHour: 1, 982 982 estimatedMinute: 20] … … 985 985 //AssignedPerson #2 986 986 p = [person: Person.get(5), 987 task: Task. get(1),987 task: Task.list()[0], 988 988 estimatedHour: 3, 989 989 estimatedMinute: 30] … … 997 997 998 998 //TaskRecurringSchedule #1 999 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task. get(1),999 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.list()[0], 1000 1000 recurEvery: 1, 1001 1001 recurPeriod: Period.get(2), … … 1008 1008 1009 1009 //TaskRecurringSchedule #2 1010 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task. get(6),1010 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.list()[0], 1011 1011 recurEvery: 1, 1012 1012 recurPeriod: Period.get(1), … … 1270 1270 taskProcedureInstance = new TaskProcedure(name: "Daily check") 1271 1271 saveAndTest(taskProcedureInstance) 1272 taskProcedureInstance.addToTasks(Task. get(1))1272 taskProcedureInstance.addToTasks(Task.list()[0]) 1273 1273 } 1274 1274 -
trunk/grails-app/services/TaskSearchService.groovy
r524 r529 251 251 * @param endDate The end date to get tasks for, defaults to the start of tomorrow and is exclusive (less than). 252 252 */ 253 def getBudgetTasks(params, budgetStatus=null, startDate=null, endDate=null) {253 def getBudgetTasks(params, taskBudgetStatus=null, startDate=null, endDate=null) { 254 254 def paginateParams = [:] 255 255 paginateParams.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax) … … 261 261 262 262 def namedParams = [:] 263 namedParams. budgetStatus = budgetStatus ?: TaskBudgetStatus.read(2) // Planned.263 namedParams.taskBudgetStatus = taskBudgetStatus ?: TaskBudgetStatus.read(2) // Planned. 264 264 namedParams.startDate = startDate ?: dateUtilService.today 265 namedParams.endDate = endDate ?: dateUtilService. oneWeekAgo265 namedParams.endDate = endDate ?: dateUtilService.tomorrow 266 266 267 267 def baseQuery = "from Task as task \ 268 268 where (task.trash = false \ 269 and task. budgetStatus = :budgetStatus \269 and task.taskBudgetStatus = :taskBudgetStatus \ 270 270 and task.targetStartDate < :endDate \ 271 271 and task.targetCompletionDate >= :startDate \
Note: See TracChangeset
for help on using the changeset viewer.