Changeset 213 for trunk/grails-app/services
- Timestamp:
- Dec 3, 2009, 11:44:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskRecurringScheduleService.groovy
r207 r213 74 74 75 75 if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday()) 76 return fail("nextTargetStartDate", "taskRecurring .nextTargetStartDate.NotInTheFuture")76 return fail("nextTargetStartDate", "taskRecurringSchedule.nextTargetStartDate.mayNotBePast") 77 77 78 78 taskInstance.taskRecurringSchedule = result.taskRecurringScheduleInstance … … 115 115 } 116 116 117 result.taskRecurringScheduleInstance. validate()117 result.taskRecurringScheduleInstance.properties = params 118 118 119 Date originalDate = result.taskRecurringScheduleInstance.nextTargetStartDate 120 result.taskRecurringScheduleInstance.properties = params 121 Date newDate = result.taskRecurringScheduleInstance.nextTargetStartDate 122 123 // If user changes nextTargetStartDate then ensure it is in the future, otherwise it's ok to keep the original date. 124 if(originalDate.getTime() != newDate.getTime()) 125 { 126 if(newDate < dateUtilService.getToday()) 127 return fail("nextTargetStartDate", "taskRecurring.nextTargetStartDate.NotInTheFuture") 128 } 119 if(result.taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday()) 120 return fail("nextTargetStartDate", "taskRecurringSchedule.nextTargetStartDate.mayNotBePast") 129 121 130 122 result.taskRecurringScheduleInstance.setNextGenerationDate()
Note: See TracChangeset
for help on using the changeset viewer.