Changeset 199


Ignore:
Timestamp:
Nov 28, 2009, 2:17:34 PM (14 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:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 stacktrace.log
         1*.log
        22*.war
  • trunk/application.properties

    r170 r199  
    11#utf-8
    2 #Tue Oct 27 09:01:31 EST 2009
     2#Tue Nov 24 20:57:54 EST 2009
    33plugins.export=0.4
    44plugins.acegi=0.5.1
     
    77plugins.class-diagram=0.4.1
    88plugins.help-balloons=1.2
    9 plugins.quartz=0.4.1-SNAPSHOT
     9plugins.quartz=0.4.1
    1010plugins.richui=0.6
    1111app.servlet.version=2.4
  • trunk/grails-app/conf/BootStrap.groovy

    r149 r199  
    77    def init = { servletContext ->
    88
    9     println "**** BootStrap GrailsUtil.environment = ${GrailsUtil.environment}"
     9        log.debug "GrailsUtil.environment = ${GrailsUtil.environment}"
    1010
    1111        switch (GrailsUtil.environment)
    1212        {
    1313            case "development":
    14                         createDataService.ensureAdminAccess()
     14                        createDataService.ensureSystemAndAdminAccess()
    1515                        createDataService.createBaseData()
    1616                        createDataService.createDemoData()
    1717                        break
    1818            case "test":
    19                         createDataService.ensureAdminAccess()
     19                        createDataService.ensureSystemAndAdminAccess()
    2020                        break
    2121            case "production":
    22                         createDataService.ensureAdminAccess()
     22                        createDataService.ensureSystemAndAdminAccess()
    2323                        break
    2424        }
  • trunk/grails-app/conf/Config.groovy

    r197 r199  
    8989    error "grails.app.service.PersonService"
    9090    error "grails.app.service.NavigationService"
     91    error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService"
    9192}
    9293
     
    128129} // end environments
    129130
    130 /** Navigation plugin menu.
    131    * The top level titles are taken from i18n message bundles.
    132    * Subitems i18n message bundles are not currently resolving with this plugin.
    133    */
     131/**
     132 * Navigation plugin menu.
     133 * The top level titles are taken from i18n message bundles.
     134 * Subitems i18n message bundles are not currently resolving with this plugin.
     135 */
    134136navigation.nav = [
    135137    [order:10, controller:'appCore', title:'home', action:'start',
     
    169171]
    170172
    171 /** Navigation plugin alternate menu.
    172    * The alternate top level titles are not displayed anywhere.
    173    * Subitems i18n message bundles are not currently resolving with this plugin.
    174    */
     173/**
     174 * Navigation plugin alternate menu.
     175 * The alternate top level titles are not displayed anywhere.
     176 * Subitems i18n message bundles are not currently resolving with this plugin.
     177 */
    175178navigation.navAlt = [
    176179    [order:10, controller:'person', title:'person', action:'list',
     
    191194    ]
    192195]
     196
     197/**
     198 * Some custom globals.
     199 */
     200taskRecurringScheduleJob.repeatInterval=10
  • 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
  • trunk/grails-app/domain/Period.groovy

    r136 r199  
    33    String period
    44    boolean isActive = true
    5 
    6     static hasMany = [taskRecurringSchedules: TaskRecurringSchedule]
    7    
    8     static mappedBy = [taskRecurringSchedules:"recurPeriod"]
    95
    106//     static belongsTo = []
  • trunk/grails-app/domain/TaskRecurringSchedule.groovy

    r195 r199  
    55    Task lastGeneratedSubTask
    66    Period recurPeriod
    7     Period generateAheadPeriod
    87    Period taskDurationPeriod
    98
     
    1110    Integer taskDuration = 0
    1211    Integer generateAhead = 1
    13     Date startDate = new Date()
    14     Date lastGeneratedDate
     12    Integer subTasksGenerated = 0
     13    Date nextGenerationDate = new Date()
    1514    Date nextTargetStartDate = new Date()
    1615    Date nextTargetCompletionDate = new Date()
    17     Date nextGenerationDate = new Date()
    18     boolean isEnabled = true
     16    boolean enabled = true
    1917
    2018//     static hasMany = []
     
    2523        recurEvery(min:1, max:365)
    2624        taskDuration(min:0, max:365)
    27         generateAhead(min:0, max:365)
    28         lastGeneratedDate(nullable:true)
     25        generateAhead(min:0, max:62)
    2926        lastGeneratedSubTask(nullable:true)
    3027    }
     
    3835    // in the hope that this will be fixed in future versions.
    3936    def beforeInsert = {
    40         nextTargetStartDate = startDate
    4137        setNextGenerationDate()
    4238        setNextTargetCompletionDate()
    4339    }
    4440
    45     public void setNextGenerationDate() {
    46         switch (generateAheadPeriod.period) {
     41    public void setNextTargetStartDate() {
     42        switch (recurPeriod.period) {
    4743            case "Day(s)":
    4844                use(TimeCategory) {
    49                     nextGenerationDate = nextTargetStartDate - generateAhead.days
     45                    nextTargetStartDate = nextTargetStartDate + recurEvery.days
    5046                }
    5147                break
    5248            case "Week(s)":
    5349                use(TimeCategory) {
    54                     nextGenerationDate = nextTargetStartDate - generateAhead.weeks
     50                    nextTargetStartDate = nextTargetStartDate + recurEvery.weeks
    5551                }
    5652                break
    5753            case "Month(s)":
    5854                use(TimeCategory) {
    59                     nextGenerationDate = nextTargetStartDate - generateAhead.months
     55                    nextTargetStartDate = nextTargetStartDate + recurEvery.months
    6056                }
    6157                break
    6258            case "Year(s)":
    6359                use(TimeCategory) {
    64                     nextGenerationDate = nextTargetStartDate - generateAhead.years
     60                    nextTargetStartDate = nextTargetStartDate + recurEvery.years
    6561                }
    6662                break
    6763        default:
     64                log.error "No case for recurPeriod.period: ${recurPeriod.period}"
    6865                break
     66        }
     67    }
     68
     69    public void setNextGenerationDate() {
     70        use(TimeCategory) {
     71            nextGenerationDate = nextTargetStartDate - generateAhead.days
    6972        }
    7073        def now = new Date()
     
    9598                break
    9699            default:
     100                log.error "No case for taskDurationPeriod.period: ${taskDurationPeriod.period}"
    97101                break
    98102        }
  • trunk/grails-app/i18n/messages.properties

    r196 r199  
    4242task.leadPerson.help=The primay contact person.
    4343
    44 taskRecurring.startDate.NotInTheFuture=Please select a start date that is not in the past, or use original date.
    45 taskRecurring.startDate=Start Date
    46 taskRecurring.startDate.help=The tartget start date for the first auto generated subTask.
     44taskRecurring.nextTargetStartDate.NotInTheFuture=Please select a start date that is not in the past, or use original date.
     45taskRecurring.nextTargetStartDate=Next Target Start Date
     46taskRecurring.nextTargetStartDate.help=The target start date for the next auto generated subTask.
    4747
    4848task.primaryAsset=Primary Asset
  • trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy

    r137 r199  
     1import org.codehaus.groovy.grails.commons.*
    12
    2 class TaskRecurringScheduleJob {/*
    3     def timeout = 1000 // execute job once in 1 seconds
    4 //     def timeout = 60000
     3/**
     4* Provides a quartz job that reviews and generates all recurring tasks.
     5* The quartz scheduler is restarted if this file is edited so startDelay will then delay again.
     6* The execute method is called once every repeatInterval (in milliseconds).
     7* With concurrent=false the repeat interval starts counting after the previous job completes.
     8* Apparently we need a hibernate session otherwise we get a LazyInitializationException, default is true but we specify it to be sure.
     9*/
     10class TaskRecurringScheduleJob {
     11
     12    def taskRecurringScheduleService
     13
     14    def concurrent = false
     15    def sessionRequired = true
     16
     17    static triggers = {
     18        simple name: "GenerateAll",
     19                    startDelay: 60000,
     20                    repeatInterval: ConfigurationHolder.config.taskRecurringScheduleJob.repeatInterval*1000
     21    }
    522
    623    def execute() {
    7         println "TaskRecurringScheduleJob: tick"
    8         println "TaskRecurringScheduleJob: tock"/*
    9         def recurringScheduleInstanceList = RecurringSchedule.list()
    10         def now = new Date()
    1124
    12         recurringScheduleInstanceList.each() {
     25        // Some information can be accessed if we run with "def execute(context) ".
     26        // For more info see: http://quartz.sourceforge.net/javadoc/org/quartz/JobExecutionContext.html
     27        // log.debug context.getTrigger()
     28        // log.debug context.getPreviousFireTime()
     29        // log.debug context.getFireTime()
    1330
    14             if ( now > it.nextDueDate) {
    15                 def taskInstance = it.task
    16                 def subTaskInstance = new Task()
    17    
    18                 //Make our new Task a subTask.
    19                 subTaskInstance.parentTask = taskInstance
    20    
    21                 // Set the required properties
    22                 subTaskInstance.description = "Generated recurring task: "+taskInstance.description
    23                 subTaskInstance.comment = taskInstance.comment
    24                 subTaskInstance.taskGroup = taskInstance.taskGroup
    25                 subTaskInstance.taskStatus = TaskStatus.findByName("Not Started")
    26                 subTaskInstance.taskPriority = TaskPriority.get(2)
    27                 subTaskInstance.taskType = TaskType.get(1)
    28                 subTaskInstance.leadPerson = taskInstance.leadPerson
    29                 subTaskInstance.save()
    30 //                 if(subTaskInstance.save()){println "yes"}
    31    
    32                 //Set the assignedPersons
    33                 taskInstance.assignedPersons.each() {
    34    
    35                 def assignedPerson = new AssignedPerson(person: it.person,
    36                                                                                         task: subTaskInstance,
    37                                                                                         estimatedHour: it.estimatedHour,
    38                                                                                         estimatedMinute: it.estimatedMinute).save()
    39                 }
    40 
    41                 //Set the nextDueDate so that we don't loop ;-)
    42                 it.nextDueDate = it.nextDueDate + 1
    43    
    44             }
    45         }//recurringScheduleInstanceList.each()
    46     }*/
     31        // We do everything via services, quartz just sets up and fires off the thread.
     32        taskRecurringScheduleService.generateAll()
     33    }
    4734}
  • trunk/grails-app/services/CreateDataService.groovy

    r190 r199  
    1818
    1919    /**
    20     * Always call this at startup to ensure admin access.
     20    * Always call this at startup to ensure that we have admin access
     21    * and that the system pseudo person is available.
    2122    */
    22     def ensureAdminAccess() {
     23    def ensureSystemAndAdminAccess() {
    2324        if(!Authority.findByAuthority("ROLE_AppAdmin") ) {
    24             println "ROLE_AppAdmin not found, calling createAdminAuthority()."
     25            log.warn "ROLE_AppAdmin not found, calling createAdminAuthority()."
    2526            createAdminAuthority()
    2627        }
     28        if(!Person.findByloginName("system") ) {
     29            log.warn "LoginName 'system' not found, calling createSystemPerson()."
     30            createSystemPerson()
     31        }
    2732        if(!Person.findByloginName("admin") ) {
    28             println "LoginName 'admin' not found, calling createAdminPerson()."
     33            log.warn "LoginName 'admin' not found, calling createAdminPerson()."
    2934            createAdminPerson()
    3035        }
     
    3540    */
    3641    def createBaseData() {
    37         println "Creating base data..."
     42        log.info "Creating base data..."
    3843        // Person and Utils
    3944        createBaseAuthorities()
    4045        createBasePersonGroups()
    41         createBasePersons()
    4246        createBaseUnitsOfMeasure()
    4347        createBasePeriods()
     
    6468    */
    6569    def createDemoData() {
    66         println "Creating demo data..."
     70        log.info "Creating demo data..."
    6771        // Person and Utils
    6872        createDemoPersons()
     
    148152    }
    149153
     154    def createSystemPerson() {
     155        //Person
     156        def passClearText = "pass"
     157        def passwordEncoded = personService.encodePassword(passClearText)
     158        def personInstance
     159
     160        //Person #1
     161        personInstance = new Person(loginName:"system",
     162                                    firstName:"gnuMims",
     163                                    lastName:"System",
     164                                    description:'''This is a pseudo person that the application uses to insert data. DO NOT
     165                                                        assign login authorities or change the details of this person.''',
     166                                    pass:passClearText,
     167                                    password:passwordEncoded,
     168                                    email:"system@example.com")
     169        saveAndTest(personInstance)
     170    }
     171
    150172    def createAdminPerson() {
    151173        //Person
     
    154176        def personInstance
    155177
    156         //Person #1
     178        //Person #2
    157179        personInstance = new Person(loginName:"admin",
    158180                                    firstName:"Admin",
    159181                                    lastName:"Powers",
     182                                    description:'''Every time the application starts it ensures that the 'admin' login name is available.
     183                                                        DO update the password and other details but keep the login name as 'admin'. ''',
    160184                                    pass:passClearText,
    161185                                    password:passwordEncoded,
     
    166190
    167191    def createBasePersons() {
     192    }
     193
     194    def createDemoPersons() {
    168195        //Person
    169196        def passClearText = "pass"
     
    171198        def personInstance
    172199
    173         //Person #1 is admin.
    174 
    175         //Person #2
     200        //Person #1 is system.
     201        //Person #2 is admin.
     202
     203        //Person #3
    176204        personInstance = new Person(loginName:"manager",
    177205                                    firstName:"Demo",
     
    185213        personInstance.addToPersonGroups(PersonGroup.get(5))
    186214
    187         //Person #3
     215        //Person #4
    188216        personInstance = new Person(loginName:"user",
    189217                                    firstName:"Demo",
     
    195223        personInstance.addToAuthorities(Authority.get(3))
    196224        personInstance.addToPersonGroups(PersonGroup.get(1))
    197     }
    198 
    199     def createDemoPersons() {
    200         //Person
    201         def passClearText = "pass"
    202         def passwordEncoded = personService.encodePassword(passClearText)
    203         def personInstance
    204 
    205         //Person #4
     225
     226        //Person #5
    206227        personInstance = new Person(loginName:"craig",
    207228                                    firstName:"Craig",
     
    214235        personInstance.addToPersonGroups(PersonGroup.get(1))
    215236
    216         //Person #5
     237        //Person #6
    217238        personInstance = new Person(loginName:"john",
    218239                                    firstName:"John",
     
    225246        personInstance.addToPersonGroups(PersonGroup.get(2))
    226247
    227         //Person #6
     248        //Person #7
    228249        personInstance = new Person(loginName:"mann",
    229250                                    firstName:"Production",
     
    425446        def taskPriorityInstance
    426447
    427         taskPriorityInstance = new TaskPriority(name:"Normal")
     448        taskPriorityInstance = new TaskPriority(name:"Normal") // #1
    428449        saveAndTest(taskPriorityInstance)
    429450
    430         taskPriorityInstance = new TaskPriority(name:"Low")
     451        taskPriorityInstance = new TaskPriority(name:"Low") // #2
    431452        saveAndTest(taskPriorityInstance)
    432453
    433         taskPriorityInstance = new TaskPriority(name:"High")
     454        taskPriorityInstance = new TaskPriority(name:"High") // #3
    434455        saveAndTest(taskPriorityInstance)
    435456
    436         taskPriorityInstance = new TaskPriority(name:"Immediate")
     457        taskPriorityInstance = new TaskPriority(name:"Immediate") // #4
    437458        saveAndTest(taskPriorityInstance)
    438459    }
     
    443464        def taskTypeInstance
    444465
    445         taskTypeInstance = new TaskType(name:"Unscheduled Breakin")
     466        taskTypeInstance = new TaskType(name:"Unscheduled Breakin") // #1
    446467        saveAndTest(taskTypeInstance)
    447468
    448         taskTypeInstance = new TaskType(name:"Preventative Maintenance")
     469        taskTypeInstance = new TaskType(name:"Preventative Maintenance") // #2
    449470        saveAndTest(taskTypeInstance)
    450471
    451         taskTypeInstance = new TaskType(name:"Project")
     472        taskTypeInstance = new TaskType(name:"Project") // #3
    452473        saveAndTest(taskTypeInstance)
    453474
    454         taskTypeInstance = new TaskType(name:"Turnaround")
     475        taskTypeInstance = new TaskType(name:"Turnaround") // #4
    455476        saveAndTest(taskTypeInstance)
    456477
    457         taskTypeInstance = new TaskType(name:"Production Run")
     478        taskTypeInstance = new TaskType(name:"Production Run") // #5
    458479        saveAndTest(taskTypeInstance)
    459480    }
     
    481502        //Task #1
    482503        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    483                 taskStatus:TaskStatus.findByName("Not Started"),
    484504                taskPriority:TaskPriority.get(2),
    485505                taskType:TaskType.get(1),
     
    493513        //Task #2
    494514        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    495                 taskStatus:TaskStatus.findByName("Not Started"),
    496515                taskPriority:TaskPriority.get(2),
    497516                taskType:TaskType.get(1),
     
    506525        //Task #3
    507526        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    508                 taskStatus:TaskStatus.findByName("Not Started"),
    509527                taskPriority:TaskPriority.get(2),
    510528                taskType:TaskType.get(1),
     
    519537        //Task #4
    520538        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
    521                  taskStatus:TaskStatus.findByName("Not Started"),
    522539                 taskPriority:TaskPriority.get(2),
    523540                 taskType:TaskType.get(1),
     
    532549        //Task #5
    533550        p = [taskGroup:TaskGroup.findByName("Production Activites"),
    534                  taskStatus:TaskStatus.findByName("Not Started"),
    535551                 taskPriority:TaskPriority.get(2),
    536552                 taskType:TaskType.get(5),
     
    538554                 description:"Production Report",
    539555                 comment:"Production report for specific production run or shift",
    540                 targetStartDate:new Date()-7]
     556                targetStartDate:new Date()-6]
    541557
    542558        taskResult = taskService.create(p)
    543559
    544560        //Task #6
    545         p = [taskGroup:TaskGroup.findByName("New Projects"),
    546                  taskStatus:TaskStatus.findByName("Not Started"),
    547                  taskPriority:TaskPriority.get(2),
    548                  taskType:TaskType.get(3),
    549                  leadPerson:Person.get(1),
    550                  description:"Make killer CMMS app",
    551                  comment:"Use Grails and get a move on!",
    552                 targetStartDate:new Date()-6]
     561        p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
     562                 taskPriority:TaskPriority.get(1),
     563                 taskType:TaskType.get(2),
     564                 leadPerson:Person.get(4),
     565                 description:"This is a recurring task",
     566                 comment:"If there is a parent task specified then this is a generated sub task, if there is a recurring schedule specified then this is a parent task.",
     567                targetStartDate:new Date()]
    553568
    554569        taskResult = taskService.create(p)
     
    631646        taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(1),
    632647                                                                                                    recurEvery: 1,
    633                                                                                                     recurPeriod: Period.get(1),
    634                                                                                                     startDate: new Date(),
     648                                                                                                    recurPeriod: Period.get(2),
     649                                                                                                    nextTargetStartDate: new Date(),
    635650                                                                                                    generateAhead: 1,
    636                                                                                                     generateAheadPeriod: Period.get(1),
    637                                                                                                     taskDuration: 1,
    638                                                                                                     taskDurationPeriod: Period.get(1))
     651                                                                                                    taskDuration: 2,
     652                                                                                                    taskDurationPeriod: Period.get(1),
     653                                                                                                    enabled: false)
    639654        saveAndTest(taskRecurringScheduleInstance)
    640655
    641656        //TaskRecurringSchedule #2
    642         taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(2),
     657        taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(6),
    643658                                                                                                    recurEvery: 1,
    644659                                                                                                    recurPeriod: Period.get(1),
    645                                                                                                     startDate: new Date(),
     660                                                                                                    nextTargetStartDate: new Date(),
    646661                                                                                                    generateAhead: 1,
    647                                                                                                     generateAheadPeriod: Period.get(1),
    648662                                                                                                    taskDuration: 1,
    649                                                                                                     taskDurationPeriod: Period.get(1))
     663                                                                                                    taskDurationPeriod: Period.get(1),
     664                                                                                                    enabled: true)
    650665        saveAndTest(taskRecurringScheduleInstance)
    651666    }
     
    10511066        if(!object.save()) {
    10521067//             DemoDataSuccessful = false
    1053             println "'${object}' failed to save!"
    1054             println object.errors
     1068            log.error "'${object}' failed to save!"
     1069            log.error object.errors
    10551070            return false
    10561071        }
  • trunk/grails-app/views/taskDetailed/show.gsp

    r196 r199  
    462462
    463463                                            <td valign="top" class="value">${taskRecurringScheduleInstance.encodeAsHTML()}</td>
    464 
    465                                         </tr>
    466 
    467                                         <tr class="prop">
    468                                             <td valign="top" class="name">Start Date:</td>
     464                                        </tr>
     465
     466                                        <tr class="prop">
     467                                            <td valign="top" class="name">Next Generation Date:</td>
    469468
    470469                                            <td valign="top" class="value">
    471                                                 <g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd-MMM-yyyy"/>
     470                                                <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd-MMM-yyyy"/>
    472471                                            </td>
    473 
     472                                        </tr>
     473
     474                                        <tr class="prop">
     475                                            <td valign="top" class="name">Generate Ahead:</td>
     476
     477                                            <td valign="top" class="value">
     478                                                ${taskRecurringScheduleInstance?.generateAhead} ${Period.get(1).encodeAsHTML()}
     479                                            </td>
     480                                        </tr>
     481
     482                                        <tr class="prop">
     483                                            <td valign="top" class="name">Next Target Start Date:</td>
     484
     485                                            <td valign="top" class="value">
     486                                                <g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd-MMM-yyyy"/>
     487                                            </td>
    474488                                        </tr>
    475489
     
    483497
    484498                                        <tr class="prop">
    485                                             <td valign="top" class="name">Generate Ahead:</td>
    486 
    487                                             <td valign="top" class="value">
    488                                                 ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod}
    489                                             </td>
    490 
    491                                         </tr>
    492 
    493                                         </tr>
    494 
    495                                         <tr class="prop">
    496                                             <td valign="top" class="name">Is Enabled:</td>
    497 
    498                                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td>
    499 
    500                                         </tr>
    501 
    502                                     </tbody>
    503                                 </table>
    504 
    505                                 <table>
    506                                     <tbody>
    507 
    508                                         <tr class="prop">
    509                                             <td valign="top" class="name">Next Target Start Date:</td>   
    510 
    511                                             <td valign="top" class="value">
    512                                                 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd-MMM-yyyy"/>
    513                                             </td>
    514 
    515                                         </tr>
    516 
    517                                         <tr class="prop">
    518                                             <td valign="top" class="name">Next Target Completion Date:</td>   
     499                                            <td valign="top" class="name">Next Target Completion Date:</td>
    519500
    520501                                            <td valign="top" class="value">
    521502                                                <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd-MMM-yyyy"/>
    522503                                            </td>
    523 
    524                                         </tr>
    525 
    526                                         <tr class="prop">
    527                                             <td valign="top" class="name">Next Generation Date:</td>
    528 
    529                                             <td valign="top" class="value">
    530                                                 <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd-MMM-yyyy"/>
    531                                             </td>
    532                                         </tr>
    533 
    534                                         <tr class="prop">
    535                                             <td valign="top" class="name">Last Generated Date:</td>
    536 
    537                                             <td valign="top" class="value">
    538                                                 <g:formatDate date="${taskRecurringScheduleInstance.lastGeneratedDate}" format="EEE, dd-MMM-yyyy"/>
    539                                             </td>
    540 
    541                                         </tr>
    542 
    543                                         <tr class="prop">
    544                                             <td valign="top" class="name">Last Generated Sub Task:</td>
    545 
    546                                             <td valign="top" class="value">
    547                                                 <g:link controller="taskDetailed" action="show" id="${taskRecurringScheduleInstance?.lastGeneratedSubTask?.id}">
    548                                                     ${taskRecurringScheduleInstance?.lastGeneratedSubTask?.encodeAsHTML()}
    549                                                 </g:link>
    550                                             </td>
    551                                         </tr>
     504                                        </tr>
     505
     506                                        <tr class="prop">
     507                                            <td valign="top" class="name">Enabled:</td>
     508
     509                                            <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td>
     510                                        </tr>
     511
    552512                                    </tbody>
    553513                                </table>
     
    557517                                    <input type="hidden" name="id" value="${taskRecurringScheduleInstance?.id}" />
    558518                                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
     519                                    <span class="button"><g:actionSubmit class="go" value="Show" /></span>
    559520                                </g:form>
    560521                            </div>
  • trunk/grails-app/views/taskRecurringSchedule/create.gsp

    r178 r199  
    5555                            <tr class="prop">
    5656                                <td valign="top" class="name">
    57                                     <label for="lastGeneratedDate">Last Generated Date:</label>
    58                                 </td>
    59                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'lastGeneratedDate','errors')}">
    60                                     <g:datePicker name="lastGeneratedDate" value="${taskRecurringScheduleInstance?.lastGeneratedDate}" precision="minute" noSelection="['':'']"></g:datePicker>
    61                                 </td>
    62                             </tr>
    63                        
    64                             <tr class="prop">
    65                                 <td valign="top" class="name">
    6657                                    <label for="lastGeneratedSubTask">Last Generated Sub Task:</label>
    6758                                </td>
     
    7364                            <tr class="prop">
    7465                                <td valign="top" class="name">
    75                                     <label for="generateAheadPeriod">Generate Ahead Period:</label>
     66                                    <label for="enabled">Enabled:</label>
    7667                                </td>
    77                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAheadPeriod','errors')}">
    78                                     <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
    79                                 </td>
    80                             </tr>
    81                        
    82                             <tr class="prop">
    83                                 <td valign="top" class="name">
    84                                     <label for="isEnabled">Is Enabled:</label>
    85                                 </td>
    86                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'isEnabled','errors')}">
    87                                     <g:checkBox name="isEnabled" value="${taskRecurringScheduleInstance?.isEnabled}" ></g:checkBox>
     68                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'enabled','errors')}">
     69                                    <g:checkBox name="enabled" value="${taskRecurringScheduleInstance?.enabled}" ></g:checkBox>
    8870                                </td>
    8971                            </tr>
     
    127109                            <tr class="prop">
    128110                                <td valign="top" class="name">
    129                                     <label for="startDate">Start Date:</label>
     111                                    <label for="subTasksGenerated">Sub Tasks Generated:</label>
    130112                                </td>
    131                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'startDate','errors')}">
    132                                     <g:datePicker name="startDate" value="${taskRecurringScheduleInstance?.startDate}" precision="minute" ></g:datePicker>
     113                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'subTasksGenerated','errors')}">
     114                                    <input type="text" id="subTasksGenerated" name="subTasksGenerated" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'subTasksGenerated')}" />
    133115                                </td>
    134116                            </tr>
  • trunk/grails-app/views/taskRecurringSchedule/edit.gsp

    r178 r199  
    5858                            <tr class="prop">
    5959                                <td valign="top" class="name">
    60                                     <label for="lastGeneratedDate">Last Generated Date:</label>
    61                                 </td>
    62                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'lastGeneratedDate','errors')}">
    63                                     <g:datePicker name="lastGeneratedDate" value="${taskRecurringScheduleInstance?.lastGeneratedDate}" precision="minute" noSelection="['':'']"></g:datePicker>
    64                                 </td>
    65                             </tr>
    66                        
    67                             <tr class="prop">
    68                                 <td valign="top" class="name">
    6960                                    <label for="lastGeneratedSubTask">Last Generated Sub Task:</label>
    7061                                </td>
     
    7667                            <tr class="prop">
    7768                                <td valign="top" class="name">
    78                                     <label for="generateAheadPeriod">Generate Ahead Period:</label>
     69                                    <label for="enabled">Enabled:</label>
    7970                                </td>
    80                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAheadPeriod','errors')}">
    81                                     <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
    82                                 </td>
    83                             </tr>
    84                        
    85                             <tr class="prop">
    86                                 <td valign="top" class="name">
    87                                     <label for="isEnabled">Is Enabled:</label>
    88                                 </td>
    89                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'isEnabled','errors')}">
    90                                     <g:checkBox name="isEnabled" value="${taskRecurringScheduleInstance?.isEnabled}" ></g:checkBox>
     71                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'enabled','errors')}">
     72                                    <g:checkBox name="enabled" value="${taskRecurringScheduleInstance?.enabled}" ></g:checkBox>
    9173                                </td>
    9274                            </tr>
     
    130112                            <tr class="prop">
    131113                                <td valign="top" class="name">
    132                                     <label for="startDate">Start Date:</label>
     114                                    <label for="subTasksGenerated">Sub Tasks Generated:</label>
    133115                                </td>
    134                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'startDate','errors')}">
    135                                     <g:datePicker name="startDate" value="${taskRecurringScheduleInstance?.startDate}" precision="minute" ></g:datePicker>
     116                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'subTasksGenerated','errors')}">
     117                                    <input type="text" id="subTasksGenerated" name="subTasksGenerated" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'subTasksGenerated')}" />
    136118                                </td>
    137119                            </tr>
  • trunk/grails-app/views/taskRecurringSchedule/list.gsp

    r178 r199  
    2929                                <g:sortableColumn property="generateAhead" title="Generate Ahead" />
    3030                       
    31                                 <g:sortableColumn property="lastGeneratedDate" title="Last Generated Date" />
    32                        
    3331                                <th>Last Generated Sub Task</th>
    3432                           
     33                                <g:sortableColumn property="enabled" title="Enabled" />
     34                       
    3535                        </tr>
    3636                    </thead>
     
    4747                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}</td>
    4848                       
    49                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedDate')}</td>
     49                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}</td>
    5050                       
    51                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}</td>
     51                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td>
    5252                       
    5353                        </tr>
  • trunk/grails-app/views/taskRecurringSchedule/show.gsp

    r178 r199  
    5151                   
    5252                        <tr class="prop">
    53                             <td valign="top" class="name">Last Generated Date:</td>
    54                            
    55                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedDate')}</td>
    56                            
    57                         </tr>
    58                    
    59                         <tr class="prop">
    6053                            <td valign="top" class="name">Last Generated Sub Task:</td>
    6154                           
     
    6558                   
    6659                        <tr class="prop">
    67                             <td valign="top" class="name">Generate Ahead Period:</td>
     60                            <td valign="top" class="name">Enabled:</td>
    6861                           
    69                             <td valign="top" class="value"><g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}">${taskRecurringScheduleInstance?.generateAheadPeriod?.encodeAsHTML()}</g:link></td>
    70                            
    71                         </tr>
    72                    
    73                         <tr class="prop">
    74                             <td valign="top" class="name">Is Enabled:</td>
    75                            
    76                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td>
     62                            <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td>
    7763                           
    7864                        </tr>
     
    10793                   
    10894                        <tr class="prop">
    109                             <td valign="top" class="name">Start Date:</td>
     95                            <td valign="top" class="name">Sub Tasks Generated:</td>
    11096                           
    111                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'startDate')}</td>
     97                            <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'subTasksGenerated')}</td>
    11298                           
    11399                        </tr>
  • trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp

    r157 r199  
    3838                            <tr class="prop">
    3939                                <td valign="top" class="name">
    40                                     <label for="startDate">Start Date:</label>
     40                                    <label for="nextTargetStartDate">Next Target Start Date:</label>
    4141                                </td>
    42                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'startDate','errors')}">
    43                                     <richui:dateChooser name="startDate" format="dd-MM-yyyy" value="${taskRecurringScheduleInstance?.startDate}" />
     42                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextTargetStartDate','errors')}">
     43                                    <richui:dateChooser name="nextTargetStartDate" format="dd-MM-yyyy" value="${taskRecurringScheduleInstance?.nextTargetStartDate}" />
    4444                                </td>
    4545                            </tr>   
     
    7474                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"
    7575                                        id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
    76                                     <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
     76                                        ${Period.get(1).encodeAsHTML()}
    7777                                </td>
    7878                            </tr>
     
    8080                            <tr class="prop">
    8181                                <td valign="top" class="name">
    82                                     <label for="isEnabled">Is Enabled:</label>
     82                                    <label for="enabled">Enabled:</label>
    8383                                </td>
    84                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'isEnabled','errors')}">
    85                                     <g:checkBox name="isEnabled" value="${taskRecurringScheduleInstance?.isEnabled}" ></g:checkBox>
     84                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'enabled','errors')}">
     85                                    <g:checkBox name="enabled" value="${taskRecurringScheduleInstance?.enabled}" ></g:checkBox>
    8686                                </td>
    8787                            </tr>
  • trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp

    r157 r199  
    3939                            <tr class="prop">
    4040                                <td valign="top" class="name">
    41                                     <label for="startDate">Start Date:</label>
     41                                    <label for="nextTargetStartDate">Next Target Start Date:</label>
    4242                                </td>
    43                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'startDate','errors')}">
    44                                     <richui:dateChooser name="startDate" format="dd-MM-yyyy" value="${taskRecurringScheduleInstance?.startDate}" />
     43                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextTargetStartDate','errors')}">
     44                                    <richui:dateChooser name="nextTargetStartDate" format="dd-MM-yyyy" value="${taskRecurringScheduleInstance?.nextTargetStartDate}" />
    4545                                </td>
    4646                            </tr>   
     
    7575                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"
    7676                                        id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
    77                                     <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
     77                                        ${Period.get(1).encodeAsHTML()}
    7878                                </td>
    7979                            </tr>
     
    8181                            <tr class="prop">
    8282                                <td valign="top" class="name">
    83                                     <label for="isEnabled">Is Enabled:</label>
     83                                    <label for="enabled">Enabled:</label>
    8484                                </td>
    85                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'isEnabled','errors')}">
    86                                     <g:checkBox name="isEnabled" value="${taskRecurringScheduleInstance?.isEnabled}" ></g:checkBox>
     85                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'enabled','errors')}">
     86                                    <g:checkBox name="enabled" value="${taskRecurringScheduleInstance?.enabled}" ></g:checkBox>
    8787                                </td>
    8888                            </tr>
  • trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp

    r178 r199  
    2929                                <g:sortableColumn property="recurPeriod" title="Recur Period" />
    3030                               
    31                                 <g:sortableColumn property="isEnabled" title="Is Enabled" />
     31                                <g:sortableColumn property="enabled" title="Enabled" />
    3232
    3333                            <th></th>
     
    4848                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'recurPeriod')}</td>
    4949                       
    50                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td>
     50                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td>
    5151
    5252                            <td>
  • trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp

    r157 r199  
    1313        <div class="body">
    1414            <g:if test="${flash.message}">
    15             <div class="message">${flash.message}</div>
     15                <div class="message">${flash.message}</div>
    1616            </g:if>
    1717            <div class="dialog">
    1818                <table>
    19                     <tbody>     
    20                                    
     19                    <tbody>
    2120                        <tr class="prop">
    22                             <td valign="top" class="name">Id:</td>
    23                            
    24                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'id')}</td>
    25                            
     21                            <td valign="top" class="name">Recurring Schedule for task:</td>
     22
     23                            <td valign="top" class="value">
     24                                <g:link controller="taskDetailed" action="show" id="${taskRecurringScheduleInstance.task?.id}">
     25                                    ${taskRecurringScheduleInstance.task.encodeAsHTML()}
     26                                </g:link>
     27                            </td>
    2628                        </tr>
    2729
    28                                                 <tr class="prop">
    29                                                         <td valign="top" class="name">
    30                                                                 <label for="recForTask">Recurring Schedule for Task:</label>
    31                                                         </td>
    32                                                         <td valign="top" name="recForTask" class="value">
    33                                                                 <g:link controller="taskDetailed" action="show" id="${taskRecurringScheduleInstance?.task?.id}">${taskRecurringScheduleInstance?.task?.encodeAsHTML()}</g:link>
    34                                                         </td>
    35                                                 </tr>
    36                    
    3730                        <tr class="prop">
    38                             <td valign="top" class="name">Start Date:</td>
    39                            
    40                             <td valign="top" class="value">
    41                                 <g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd-MMM-yyyy"/>
    42                             </td>
     31                            <td valign="top" class="name"></td>
     32
     33                            <td valign="top" class="value">${taskRecurringScheduleInstance.encodeAsHTML()}</td>
    4334                        </tr>
    44                    
    45                         <tr class="prop">
    46                             <td valign="top" class="name">Recur Every:</td>
    47                            
    48                             <td valign="top" class="value">
    49                                                                 ${taskRecurringScheduleInstance?.recurEvery} ${taskRecurringScheduleInstance?.recurPeriod}
    50                                                         </td>
    51                            
    52                         </tr>
    53                    
    54                         <tr class="prop">
    55                             <td valign="top" class="name">Task Duration:</td>
    56                            
    57                             <td valign="top" class="value">
    58                                 ${taskRecurringScheduleInstance?.taskDuration} ${taskRecurringScheduleInstance?.taskDurationPeriod}
    59                             </td>
    60                         </tr>
    61                    
    62                         <tr class="prop">
    63                             <td valign="top" class="name">Generate Ahead:</td>
    64                            
    65                             <td valign="top" class="value">
    66                                 ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod}
    67                             </td>
    68                            
    69                         </tr>
    70                    
    71                         <tr class="prop">
    72                             <td valign="top" class="name">Is Enabled:</td>
    73                            
    74                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td>
    75                            
    76                         </tr>
    77                     </tbody>
    78                 </table>
    79                
    80                 <table>
    81                     <tbody>
    82                         <tr class="prop">
    83                             <td valign="top" class="name">Next Target Start Date:</td>
    84                            
    85                             <td valign="top" class="value">
    86                                                                 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd-MMM-yyyy"/>
    87                                                         </td>
    88                            
    89                         </tr>
    90                    
    91                         <tr class="prop">
    92                             <td valign="top" class="name">Next Target Completion Date:</td>
    93                            
    94                             <td valign="top" class="value">
    95                                 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd-MMM-yyyy"/>
    96                             </td>
    97                            
    98                         </tr>
    99                        
     35
    10036                        <tr class="prop">
    10137                            <td valign="top" class="name">Next Generation Date:</td>
    102                            
     38
    10339                            <td valign="top" class="value">
    10440                                <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd-MMM-yyyy"/>
    10541                            </td>
    10642                        </tr>
    107                                                
     43
    10844                        <tr class="prop">
    109                             <td valign="top" class="name">Last Generated Date:</td>
    110                            
     45                            <td valign="top" class="name">Generate Ahead:</td>
     46
    11147                            <td valign="top" class="value">
    112                                         <g:formatDate date="${taskRecurringScheduleInstance.lastGeneratedDate}" format="EEE, dd-MMM-yyyy"/>
    113                                                         </td>
     48                                ${taskRecurringScheduleInstance.generateAhead} ${Period.get(1).encodeAsHTML()}
     49                            </td>
    11450                        </tr>
    115                    
     51
    11652                        <tr class="prop">
    117                             <td valign="top" class="name">Last Generated Sub Task:</td>
    118                            
     53                            <td valign="top" class="name">Next Target Start Date:</td>
     54
    11955                            <td valign="top" class="value">
    120                                                                 <g:link controller="taskDetailed" action="show" id="${taskRecurringScheduleInstance?.lastGeneratedSubTask?.id}">
    121                                                                         ${taskRecurringScheduleInstance?.lastGeneratedSubTask?.encodeAsHTML()}
    122                                                                 </g:link>
    123                                                         </td>
    124                            
     56                                <g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd-MMM-yyyy"/>
     57                            </td>
    12558                        </tr>
    126                    
     59
     60                        <tr class="prop">
     61                            <td valign="top" class="name">Task Duration:</td>
     62
     63                            <td valign="top" class="value">
     64                                ${taskRecurringScheduleInstance.taskDuration} ${taskRecurringScheduleInstance.taskDurationPeriod}
     65                            </td>
     66                        </tr>
     67
     68                        <tr class="prop">
     69                            <td valign="top" class="name">Next Target Completion Date:</td>
     70
     71                            <td valign="top" class="value">
     72                                <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd-MMM-yyyy"/>
     73                            </td>
     74                        </tr>
     75
     76                        <tr class="prop">
     77                            <td valign="top" class="name">Enabled:</td>
     78
     79                            <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td>
     80                        </tr>
     81
     82                    </tbody>
     83                </table>
     84                <table>
     85                    <tbody>
     86
     87                        <tr class="prop">
     88                            <td valign="top" class="name">Note:</td>
     89
     90                            <td valign="top" class="value">
     91                                Recurring Schedules are reviewed and Sub Tasks generated every ${grailsApplication.config.taskRecurringScheduleJob.repeatInterval.encodeAsHTML()} seconds.
     92                            </td>
     93                        </tr>
     94
     95                        <tr class="prop">
     96                            <td valign="top" class="name">Sub Tasks Generated:</td>
     97
     98                            <td valign="top" class="value">
     99                                ${fieldValue(bean:taskRecurringScheduleInstance, field:'subTasksGenerated')}
     100                            </td>
     101                        </tr>
     102
     103                        <g:if test="${taskRecurringScheduleInstance.lastGeneratedSubTask}">
     104
     105                            <tr class="prop">
     106                                <td valign="top" class="name">Last Generated Sub Task:</td>
     107
     108                                <td valign="top" class="value">
     109                                    <g:link controller="taskDetailed" action="show" id="${taskRecurringScheduleInstance.lastGeneratedSubTask?.id}">
     110                                        ${taskRecurringScheduleInstance.lastGeneratedSubTask?.encodeAsHTML()}
     111                                    </g:link>
     112                                </td>
     113                            </tr>
     114
     115                            <tr class="prop">
     116                                <td valign="top" class="name"></td>
     117
     118                                <td valign="top" class="value">
     119                                        ${TaskModification.findByTaskAndTaskModificationType(taskRecurringScheduleInstance.lastGeneratedSubTask, TaskModificationType.get(1))}
     120                                </td>
     121                            </tr>
     122
     123                            <tr class="prop">
     124                                <td valign="top" class="name"></td>
     125
     126                                <td valign="top" class="value">
     127                                        With target start date:
     128                                        <g:formatDate date="${taskRecurringScheduleInstance.lastGeneratedSubTask?.targetStartDate}" format="EEE, dd-MMM-yyyy"/>
     129                                </td>
     130                            </tr>
     131
     132                        </g:if>
     133
    127134                    </tbody>
    128135                </table>
     
    130137            <div class="buttons">
    131138                <g:form>
    132                     <input type="hidden" name="id" value="${taskRecurringScheduleInstance?.id}" />
     139                    <input type="hidden" name="id" value="${taskRecurringScheduleInstance.id}" />
    133140                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
    134141<!--                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> -->
Note: See TracChangeset for help on using the changeset viewer.