- Timestamp:
- Nov 28, 2009, 2:17:34 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 stacktrace.log1 *.log 2 2 *.war
-
- Property svn:ignore
-
trunk/application.properties
r170 r199 1 1 #utf-8 2 #Tue Oct 27 09:01:31EST 20092 #Tue Nov 24 20:57:54 EST 2009 3 3 plugins.export=0.4 4 4 plugins.acegi=0.5.1 … … 7 7 plugins.class-diagram=0.4.1 8 8 plugins.help-balloons=1.2 9 plugins.quartz=0.4.1 -SNAPSHOT9 plugins.quartz=0.4.1 10 10 plugins.richui=0.6 11 11 app.servlet.version=2.4 -
trunk/grails-app/conf/BootStrap.groovy
r149 r199 7 7 def init = { servletContext -> 8 8 9 println "**** BootStrapGrailsUtil.environment = ${GrailsUtil.environment}"9 log.debug "GrailsUtil.environment = ${GrailsUtil.environment}" 10 10 11 11 switch (GrailsUtil.environment) 12 12 { 13 13 case "development": 14 createDataService.ensure AdminAccess()14 createDataService.ensureSystemAndAdminAccess() 15 15 createDataService.createBaseData() 16 16 createDataService.createDemoData() 17 17 break 18 18 case "test": 19 createDataService.ensure AdminAccess()19 createDataService.ensureSystemAndAdminAccess() 20 20 break 21 21 case "production": 22 createDataService.ensure AdminAccess()22 createDataService.ensureSystemAndAdminAccess() 23 23 break 24 24 } -
trunk/grails-app/conf/Config.groovy
r197 r199 89 89 error "grails.app.service.PersonService" 90 90 error "grails.app.service.NavigationService" 91 error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService" 91 92 } 92 93 … … 128 129 } // end environments 129 130 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 */ 134 136 navigation.nav = [ 135 137 [order:10, controller:'appCore', title:'home', action:'start', … … 169 171 ] 170 172 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 */ 175 178 navigation.navAlt = [ 176 179 [order:10, controller:'person', title:'person', action:'list', … … 191 194 ] 192 195 ] 196 197 /** 198 * Some custom globals. 199 */ 200 taskRecurringScheduleJob.repeatInterval=10 -
trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy
r178 r199 31 31 if(taskRecurringScheduleInstance) { 32 32 try { 33 taskRecurringScheduleInstance.delete( )33 taskRecurringScheduleInstance.delete(flush: true) 34 34 flash.message = "Recurring Schedule ${params.id} deleted" 35 35 redirect(action:list) … … 73 73 } 74 74 75 Date originalDate = taskRecurringScheduleInstance. startDate75 Date originalDate = taskRecurringScheduleInstance.nextTargetStartDate 76 76 taskRecurringScheduleInstance.properties = params // Domain object is now 'dirty'. 77 Date newDate = taskRecurringScheduleInstance. startDate77 Date newDate = taskRecurringScheduleInstance.nextTargetStartDate 78 78 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. 80 80 if(originalDate.getTime() != newDate.getTime()) 81 81 { … … 83 83 { 84 84 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") 86 86 render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance]) 87 87 return … … 89 89 } 90 90 91 taskRecurringScheduleInstance.nextTargetStartDate = taskRecurringScheduleInstance.startDate 92 taskRecurringScheduleInstance.setNextGenerationDate() 91 taskRecurringScheduleInstance.setNextGenerationDate() 93 92 taskRecurringScheduleInstance.setNextTargetCompletionDate() 94 93 95 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) 94 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) 96 95 { 97 96 flash.message = "Recurring Schedule ${params.id} updated" … … 121 120 catch(Exception e) { 122 121 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") 124 123 } 125 124 } // end create() … … 135 134 else { 136 135 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") 139 138 } 140 139 -
trunk/grails-app/domain/Period.groovy
r136 r199 3 3 String period 4 4 boolean isActive = true 5 6 static hasMany = [taskRecurringSchedules: TaskRecurringSchedule]7 8 static mappedBy = [taskRecurringSchedules:"recurPeriod"]9 5 10 6 // static belongsTo = [] -
trunk/grails-app/domain/TaskRecurringSchedule.groovy
r195 r199 5 5 Task lastGeneratedSubTask 6 6 Period recurPeriod 7 Period generateAheadPeriod8 7 Period taskDurationPeriod 9 8 … … 11 10 Integer taskDuration = 0 12 11 Integer generateAhead = 1 13 Date startDate = new Date()14 Date lastGeneratedDate12 Integer subTasksGenerated = 0 13 Date nextGenerationDate = new Date() 15 14 Date nextTargetStartDate = new Date() 16 15 Date nextTargetCompletionDate = new Date() 17 Date nextGenerationDate = new Date() 18 boolean isEnabled = true 16 boolean enabled = true 19 17 20 18 // static hasMany = [] … … 25 23 recurEvery(min:1, max:365) 26 24 taskDuration(min:0, max:365) 27 generateAhead(min:0, max:365) 28 lastGeneratedDate(nullable:true) 25 generateAhead(min:0, max:62) 29 26 lastGeneratedSubTask(nullable:true) 30 27 } … … 38 35 // in the hope that this will be fixed in future versions. 39 36 def beforeInsert = { 40 nextTargetStartDate = startDate41 37 setNextGenerationDate() 42 38 setNextTargetCompletionDate() 43 39 } 44 40 45 public void setNext GenerationDate() {46 switch ( generateAheadPeriod.period) {41 public void setNextTargetStartDate() { 42 switch (recurPeriod.period) { 47 43 case "Day(s)": 48 44 use(TimeCategory) { 49 next GenerationDate = nextTargetStartDate - generateAhead.days45 nextTargetStartDate = nextTargetStartDate + recurEvery.days 50 46 } 51 47 break 52 48 case "Week(s)": 53 49 use(TimeCategory) { 54 next GenerationDate = nextTargetStartDate - generateAhead.weeks50 nextTargetStartDate = nextTargetStartDate + recurEvery.weeks 55 51 } 56 52 break 57 53 case "Month(s)": 58 54 use(TimeCategory) { 59 next GenerationDate = nextTargetStartDate - generateAhead.months55 nextTargetStartDate = nextTargetStartDate + recurEvery.months 60 56 } 61 57 break 62 58 case "Year(s)": 63 59 use(TimeCategory) { 64 next GenerationDate = nextTargetStartDate - generateAhead.years60 nextTargetStartDate = nextTargetStartDate + recurEvery.years 65 61 } 66 62 break 67 63 default: 64 log.error "No case for recurPeriod.period: ${recurPeriod.period}" 68 65 break 66 } 67 } 68 69 public void setNextGenerationDate() { 70 use(TimeCategory) { 71 nextGenerationDate = nextTargetStartDate - generateAhead.days 69 72 } 70 73 def now = new Date() … … 95 98 break 96 99 default: 100 log.error "No case for taskDurationPeriod.period: ${taskDurationPeriod.period}" 97 101 break 98 102 } -
trunk/grails-app/i18n/messages.properties
r196 r199 42 42 task.leadPerson.help=The primay contact person. 43 43 44 taskRecurring. startDate.NotInTheFuture=Please select a start date that is not in the past, or use original date.45 taskRecurring. startDate=Start Date46 taskRecurring. startDate.help=The tartget start date for the first auto generated subTask.44 taskRecurring.nextTargetStartDate.NotInTheFuture=Please select a start date that is not in the past, or use original date. 45 taskRecurring.nextTargetStartDate=Next Target Start Date 46 taskRecurring.nextTargetStartDate.help=The target start date for the next auto generated subTask. 47 47 48 48 task.primaryAsset=Primary Asset -
trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy
r137 r199 1 import org.codehaus.groovy.grails.commons.* 1 2 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 */ 10 class 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 } 5 22 6 23 def execute() { 7 println "TaskRecurringScheduleJob: tick"8 println "TaskRecurringScheduleJob: tock"/*9 def recurringScheduleInstanceList = RecurringSchedule.list()10 def now = new Date()11 24 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() 13 30 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 } 47 34 } -
trunk/grails-app/services/CreateDataService.groovy
r190 r199 18 18 19 19 /** 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. 21 22 */ 22 def ensure AdminAccess() {23 def ensureSystemAndAdminAccess() { 23 24 if(!Authority.findByAuthority("ROLE_AppAdmin") ) { 24 println "ROLE_AppAdmin not found, calling createAdminAuthority()."25 log.warn "ROLE_AppAdmin not found, calling createAdminAuthority()." 25 26 createAdminAuthority() 26 27 } 28 if(!Person.findByloginName("system") ) { 29 log.warn "LoginName 'system' not found, calling createSystemPerson()." 30 createSystemPerson() 31 } 27 32 if(!Person.findByloginName("admin") ) { 28 println "LoginName 'admin' not found, calling createAdminPerson()."33 log.warn "LoginName 'admin' not found, calling createAdminPerson()." 29 34 createAdminPerson() 30 35 } … … 35 40 */ 36 41 def createBaseData() { 37 println"Creating base data..."42 log.info "Creating base data..." 38 43 // Person and Utils 39 44 createBaseAuthorities() 40 45 createBasePersonGroups() 41 createBasePersons()42 46 createBaseUnitsOfMeasure() 43 47 createBasePeriods() … … 64 68 */ 65 69 def createDemoData() { 66 println"Creating demo data..."70 log.info "Creating demo data..." 67 71 // Person and Utils 68 72 createDemoPersons() … … 148 152 } 149 153 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 150 172 def createAdminPerson() { 151 173 //Person … … 154 176 def personInstance 155 177 156 //Person # 1178 //Person #2 157 179 personInstance = new Person(loginName:"admin", 158 180 firstName:"Admin", 159 181 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'. ''', 160 184 pass:passClearText, 161 185 password:passwordEncoded, … … 166 190 167 191 def createBasePersons() { 192 } 193 194 def createDemoPersons() { 168 195 //Person 169 196 def passClearText = "pass" … … 171 198 def personInstance 172 199 173 //Person #1 is admin. 174 175 //Person #2 200 //Person #1 is system. 201 //Person #2 is admin. 202 203 //Person #3 176 204 personInstance = new Person(loginName:"manager", 177 205 firstName:"Demo", … … 185 213 personInstance.addToPersonGroups(PersonGroup.get(5)) 186 214 187 //Person # 3215 //Person #4 188 216 personInstance = new Person(loginName:"user", 189 217 firstName:"Demo", … … 195 223 personInstance.addToAuthorities(Authority.get(3)) 196 224 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 206 227 personInstance = new Person(loginName:"craig", 207 228 firstName:"Craig", … … 214 235 personInstance.addToPersonGroups(PersonGroup.get(1)) 215 236 216 //Person # 5237 //Person #6 217 238 personInstance = new Person(loginName:"john", 218 239 firstName:"John", … … 225 246 personInstance.addToPersonGroups(PersonGroup.get(2)) 226 247 227 //Person # 6248 //Person #7 228 249 personInstance = new Person(loginName:"mann", 229 250 firstName:"Production", … … 425 446 def taskPriorityInstance 426 447 427 taskPriorityInstance = new TaskPriority(name:"Normal") 448 taskPriorityInstance = new TaskPriority(name:"Normal") // #1 428 449 saveAndTest(taskPriorityInstance) 429 450 430 taskPriorityInstance = new TaskPriority(name:"Low") 451 taskPriorityInstance = new TaskPriority(name:"Low") // #2 431 452 saveAndTest(taskPriorityInstance) 432 453 433 taskPriorityInstance = new TaskPriority(name:"High") 454 taskPriorityInstance = new TaskPriority(name:"High") // #3 434 455 saveAndTest(taskPriorityInstance) 435 456 436 taskPriorityInstance = new TaskPriority(name:"Immediate") 457 taskPriorityInstance = new TaskPriority(name:"Immediate") // #4 437 458 saveAndTest(taskPriorityInstance) 438 459 } … … 443 464 def taskTypeInstance 444 465 445 taskTypeInstance = new TaskType(name:"Unscheduled Breakin") 466 taskTypeInstance = new TaskType(name:"Unscheduled Breakin") // #1 446 467 saveAndTest(taskTypeInstance) 447 468 448 taskTypeInstance = new TaskType(name:"Preventative Maintenance") 469 taskTypeInstance = new TaskType(name:"Preventative Maintenance") // #2 449 470 saveAndTest(taskTypeInstance) 450 471 451 taskTypeInstance = new TaskType(name:"Project") 472 taskTypeInstance = new TaskType(name:"Project") // #3 452 473 saveAndTest(taskTypeInstance) 453 474 454 taskTypeInstance = new TaskType(name:"Turnaround") 475 taskTypeInstance = new TaskType(name:"Turnaround") // #4 455 476 saveAndTest(taskTypeInstance) 456 477 457 taskTypeInstance = new TaskType(name:"Production Run") 478 taskTypeInstance = new TaskType(name:"Production Run") // #5 458 479 saveAndTest(taskTypeInstance) 459 480 } … … 481 502 //Task #1 482 503 p = [taskGroup:TaskGroup.findByName("Engineering Activites"), 483 taskStatus:TaskStatus.findByName("Not Started"),484 504 taskPriority:TaskPriority.get(2), 485 505 taskType:TaskType.get(1), … … 493 513 //Task #2 494 514 p = [taskGroup:TaskGroup.findByName("Engineering Activites"), 495 taskStatus:TaskStatus.findByName("Not Started"),496 515 taskPriority:TaskPriority.get(2), 497 516 taskType:TaskType.get(1), … … 506 525 //Task #3 507 526 p = [taskGroup:TaskGroup.findByName("Engineering Activites"), 508 taskStatus:TaskStatus.findByName("Not Started"),509 527 taskPriority:TaskPriority.get(2), 510 528 taskType:TaskType.get(1), … … 519 537 //Task #4 520 538 p = [taskGroup:TaskGroup.findByName("Engineering Activites"), 521 taskStatus:TaskStatus.findByName("Not Started"),522 539 taskPriority:TaskPriority.get(2), 523 540 taskType:TaskType.get(1), … … 532 549 //Task #5 533 550 p = [taskGroup:TaskGroup.findByName("Production Activites"), 534 taskStatus:TaskStatus.findByName("Not Started"),535 551 taskPriority:TaskPriority.get(2), 536 552 taskType:TaskType.get(5), … … 538 554 description:"Production Report", 539 555 comment:"Production report for specific production run or shift", 540 targetStartDate:new Date()- 7]556 targetStartDate:new Date()-6] 541 557 542 558 taskResult = taskService.create(p) 543 559 544 560 //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()] 553 568 554 569 taskResult = taskService.create(p) … … 631 646 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(1), 632 647 recurEvery: 1, 633 recurPeriod: Period.get( 1),634 startDate: new Date(),648 recurPeriod: Period.get(2), 649 nextTargetStartDate: new Date(), 635 650 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) 639 654 saveAndTest(taskRecurringScheduleInstance) 640 655 641 656 //TaskRecurringSchedule #2 642 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get( 2),657 taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(6), 643 658 recurEvery: 1, 644 659 recurPeriod: Period.get(1), 645 startDate: new Date(),660 nextTargetStartDate: new Date(), 646 661 generateAhead: 1, 647 generateAheadPeriod: Period.get(1),648 662 taskDuration: 1, 649 taskDurationPeriod: Period.get(1)) 663 taskDurationPeriod: Period.get(1), 664 enabled: true) 650 665 saveAndTest(taskRecurringScheduleInstance) 651 666 } … … 1051 1066 if(!object.save()) { 1052 1067 // DemoDataSuccessful = false 1053 println"'${object}' failed to save!"1054 printlnobject.errors1068 log.error "'${object}' failed to save!" 1069 log.error object.errors 1055 1070 return false 1056 1071 } -
trunk/grails-app/views/taskDetailed/show.gsp
r196 r199 462 462 463 463 <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> 469 468 470 469 <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"/> 472 471 </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> 474 488 </tr> 475 489 … … 483 497 484 498 <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> 519 500 520 501 <td valign="top" class="value"> 521 502 <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd-MMM-yyyy"/> 522 503 </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 552 512 </tbody> 553 513 </table> … … 557 517 <input type="hidden" name="id" value="${taskRecurringScheduleInstance?.id}" /> 558 518 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 519 <span class="button"><g:actionSubmit class="go" value="Show" /></span> 559 520 </g:form> 560 521 </div> -
trunk/grails-app/views/taskRecurringSchedule/create.gsp
r178 r199 55 55 <tr class="prop"> 56 56 <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">66 57 <label for="lastGeneratedSubTask">Last Generated Sub Task:</label> 67 58 </td> … … 73 64 <tr class="prop"> 74 65 <td valign="top" class="name"> 75 <label for=" generateAheadPeriod">Generate Ahead Period:</label>66 <label for="enabled">Enabled:</label> 76 67 </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> 88 70 </td> 89 71 </tr> … … 127 109 <tr class="prop"> 128 110 <td valign="top" class="name"> 129 <label for="s tartDate">Start Date:</label>111 <label for="subTasksGenerated">Sub Tasks Generated:</label> 130 112 </td> 131 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'s tartDate','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')}" /> 133 115 </td> 134 116 </tr> -
trunk/grails-app/views/taskRecurringSchedule/edit.gsp
r178 r199 58 58 <tr class="prop"> 59 59 <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">69 60 <label for="lastGeneratedSubTask">Last Generated Sub Task:</label> 70 61 </td> … … 76 67 <tr class="prop"> 77 68 <td valign="top" class="name"> 78 <label for=" generateAheadPeriod">Generate Ahead Period:</label>69 <label for="enabled">Enabled:</label> 79 70 </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> 91 73 </td> 92 74 </tr> … … 130 112 <tr class="prop"> 131 113 <td valign="top" class="name"> 132 <label for="s tartDate">Start Date:</label>114 <label for="subTasksGenerated">Sub Tasks Generated:</label> 133 115 </td> 134 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'s tartDate','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')}" /> 136 118 </td> 137 119 </tr> -
trunk/grails-app/views/taskRecurringSchedule/list.gsp
r178 r199 29 29 <g:sortableColumn property="generateAhead" title="Generate Ahead" /> 30 30 31 <g:sortableColumn property="lastGeneratedDate" title="Last Generated Date" />32 33 31 <th>Last Generated Sub Task</th> 34 32 33 <g:sortableColumn property="enabled" title="Enabled" /> 34 35 35 </tr> 36 36 </thead> … … 47 47 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}</td> 48 48 49 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGenerated Date')}</td>49 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}</td> 50 50 51 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:' lastGeneratedSubTask')}</td>51 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td> 52 52 53 53 </tr> -
trunk/grails-app/views/taskRecurringSchedule/show.gsp
r178 r199 51 51 52 52 <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">60 53 <td valign="top" class="name">Last Generated Sub Task:</td> 61 54 … … 65 58 66 59 <tr class="prop"> 67 <td valign="top" class="name"> Generate Ahead Period:</td>60 <td valign="top" class="name">Enabled:</td> 68 61 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> 77 63 78 64 </tr> … … 107 93 108 94 <tr class="prop"> 109 <td valign="top" class="name">S tart Date:</td>95 <td valign="top" class="name">Sub Tasks Generated:</td> 110 96 111 <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'s tartDate')}</td>97 <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'subTasksGenerated')}</td> 112 98 113 99 </tr> -
trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp
r157 r199 38 38 <tr class="prop"> 39 39 <td valign="top" class="name"> 40 <label for=" startDate">Start Date:</label>40 <label for="nextTargetStartDate">Next Target Start Date:</label> 41 41 </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}" /> 44 44 </td> 45 45 </tr> … … 74 74 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}" 75 75 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()} 77 77 </td> 78 78 </tr> … … 80 80 <tr class="prop"> 81 81 <td valign="top" class="name"> 82 <label for=" isEnabled">IsEnabled:</label>82 <label for="enabled">Enabled:</label> 83 83 </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> 86 86 </td> 87 87 </tr> -
trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp
r157 r199 39 39 <tr class="prop"> 40 40 <td valign="top" class="name"> 41 <label for=" startDate">Start Date:</label>41 <label for="nextTargetStartDate">Next Target Start Date:</label> 42 42 </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}" /> 45 45 </td> 46 46 </tr> … … 75 75 <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}" 76 76 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()} 78 78 </td> 79 79 </tr> … … 81 81 <tr class="prop"> 82 82 <td valign="top" class="name"> 83 <label for=" isEnabled">IsEnabled:</label>83 <label for="enabled">Enabled:</label> 84 84 </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> 87 87 </td> 88 88 </tr> -
trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp
r178 r199 29 29 <g:sortableColumn property="recurPeriod" title="Recur Period" /> 30 30 31 <g:sortableColumn property=" isEnabled" title="IsEnabled" />31 <g:sortableColumn property="enabled" title="Enabled" /> 32 32 33 33 <th></th> … … 48 48 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'recurPeriod')}</td> 49 49 50 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:' isEnabled')}</td>50 <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}</td> 51 51 52 52 <td> -
trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp
r157 r199 13 13 <div class="body"> 14 14 <g:if test="${flash.message}"> 15 <div class="message">${flash.message}</div>15 <div class="message">${flash.message}</div> 16 16 </g:if> 17 17 <div class="dialog"> 18 18 <table> 19 <tbody> 20 19 <tbody> 21 20 <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> 26 28 </tr> 27 29 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 37 30 <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> 43 34 </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 100 36 <tr class="prop"> 101 37 <td valign="top" class="name">Next Generation Date:</td> 102 38 103 39 <td valign="top" class="value"> 104 40 <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd-MMM-yyyy"/> 105 41 </td> 106 42 </tr> 107 43 108 44 <tr class="prop"> 109 <td valign="top" class="name"> Last Generated Date:</td>110 45 <td valign="top" class="name">Generate Ahead:</td> 46 111 47 <td valign="top" class="value"> 112 <g:formatDate date="${taskRecurringScheduleInstance.lastGeneratedDate}" format="EEE, dd-MMM-yyyy"/>113 48 ${taskRecurringScheduleInstance.generateAhead} ${Period.get(1).encodeAsHTML()} 49 </td> 114 50 </tr> 115 51 116 52 <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 119 55 <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> 125 58 </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 127 134 </tbody> 128 135 </table> … … 130 137 <div class="buttons"> 131 138 <g:form> 132 <input type="hidden" name="id" value="${taskRecurringScheduleInstance ?.id}" />139 <input type="hidden" name="id" value="${taskRecurringScheduleInstance.id}" /> 133 140 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 134 141 <!-- <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.