Ignore:
Timestamp:
Nov 28, 2009, 2:17:34 PM (15 years ago)
Author:
gav
Message:

Upgrade quartz plugin to 0.4.1 propper.
Refactor and enable quartz scheduling for recurring tasks.
Adjust svn ignores to ignore all log files.
Create a pseudo system person for automated insertions.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 stacktrace.log
         1*.log
        22*.war
  • trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy

    r178 r199  
    3131        if(taskRecurringScheduleInstance) {
    3232            try {
    33                 taskRecurringScheduleInstance.delete()
     33                taskRecurringScheduleInstance.delete(flush: true)
    3434                flash.message = "Recurring Schedule ${params.id} deleted"
    3535                redirect(action:list)
     
    7373                }
    7474
    75                 Date originalDate = taskRecurringScheduleInstance.startDate
     75                Date originalDate = taskRecurringScheduleInstance.nextTargetStartDate
    7676                taskRecurringScheduleInstance.properties = params  // Domain object is now 'dirty'.
    77                 Date newDate = taskRecurringScheduleInstance.startDate
     77                Date newDate = taskRecurringScheduleInstance.nextTargetStartDate
    7878
    79                 // If user changes startDate then ensure it is in the future, otherwise it's ok to keep the original date.
     79                // If user changes nextTargetStartDate then ensure it is in the future, otherwise it's ok to keep the original date.
    8080                if(originalDate.getTime() != newDate.getTime())
    8181                {
     
    8383                    {
    8484                        status.setRollbackOnly()  // Only allow the transaction to Rollback, preventing flush due to 'dirty'.
    85                         taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture")
     85                        taskRecurringScheduleInstance.errors.rejectValue("nextTargetStartDate", "taskRecurring.nextTargetStartDate.NotInTheFuture")
    8686                        render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
    8787                        return
     
    8989                }
    9090
    91                 taskRecurringScheduleInstance.nextTargetStartDate = taskRecurringScheduleInstance.startDate
    92                 taskRecurringScheduleInstance.setNextGenerationDate()
     91                taskRecurringScheduleInstance.setNextGenerationDate()
    9392                taskRecurringScheduleInstance.setNextTargetCompletionDate()
    9493
    95                 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) 
     94                if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true))
    9695                {
    9796                    flash.message = "Recurring Schedule ${params.id} updated"
     
    121120        catch(Exception e) {
    122121            flash.message = "Please select a task, then Create a Recurring Schedule for it"
    123             redirect(controller:"taskDetailed", action:"list")
     122            redirect(controller:"taskDetailed", action:"search")
    124123        }
    125124    } // end create()
     
    135134        else {
    136135
    137             if(taskRecurringScheduleInstance.startDate < dateUtilService.getToday()) {
    138                 taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture")
     136            if(taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday()) {
     137                taskRecurringScheduleInstance.errors.rejectValue("nextTargetStartDate", "taskRecurring.nextTargetStartDate.NotInTheFuture")
    139138            }
    140139
Note: See TracChangeset for help on using the changeset viewer.