Index: trunk/application.properties
===================================================================
--- trunk/application.properties (revision 198)
+++ trunk/application.properties (revision 199)
@@ -1,4 +1,4 @@
#utf-8
-#Tue Oct 27 09:01:31 EST 2009
+#Tue Nov 24 20:57:54 EST 2009
plugins.export=0.4
plugins.acegi=0.5.1
@@ -7,5 +7,5 @@
plugins.class-diagram=0.4.1
plugins.help-balloons=1.2
-plugins.quartz=0.4.1-SNAPSHOT
+plugins.quartz=0.4.1
plugins.richui=0.6
app.servlet.version=2.4
Index: trunk/grails-app/conf/BootStrap.groovy
===================================================================
--- trunk/grails-app/conf/BootStrap.groovy (revision 198)
+++ trunk/grails-app/conf/BootStrap.groovy (revision 199)
@@ -7,18 +7,18 @@
def init = { servletContext ->
- println "**** BootStrap GrailsUtil.environment = ${GrailsUtil.environment}"
+ log.debug "GrailsUtil.environment = ${GrailsUtil.environment}"
switch (GrailsUtil.environment)
{
case "development":
- createDataService.ensureAdminAccess()
+ createDataService.ensureSystemAndAdminAccess()
createDataService.createBaseData()
createDataService.createDemoData()
break
case "test":
- createDataService.ensureAdminAccess()
+ createDataService.ensureSystemAndAdminAccess()
break
case "production":
- createDataService.ensureAdminAccess()
+ createDataService.ensureSystemAndAdminAccess()
break
}
Index: trunk/grails-app/conf/Config.groovy
===================================================================
--- trunk/grails-app/conf/Config.groovy (revision 198)
+++ trunk/grails-app/conf/Config.groovy (revision 199)
@@ -89,4 +89,5 @@
error "grails.app.service.PersonService"
error "grails.app.service.NavigationService"
+ error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService"
}
@@ -128,8 +129,9 @@
} // end environments
-/** Navigation plugin menu.
- * The top level titles are taken from i18n message bundles.
- * Subitems i18n message bundles are not currently resolving with this plugin.
- */
+/**
+ * Navigation plugin menu.
+ * The top level titles are taken from i18n message bundles.
+ * Subitems i18n message bundles are not currently resolving with this plugin.
+ */
navigation.nav = [
[order:10, controller:'appCore', title:'home', action:'start',
@@ -169,8 +171,9 @@
]
-/** Navigation plugin alternate menu.
- * The alternate top level titles are not displayed anywhere.
- * Subitems i18n message bundles are not currently resolving with this plugin.
- */
+/**
+ * Navigation plugin alternate menu.
+ * The alternate top level titles are not displayed anywhere.
+ * Subitems i18n message bundles are not currently resolving with this plugin.
+ */
navigation.navAlt = [
[order:10, controller:'person', title:'person', action:'list',
@@ -191,2 +194,7 @@
]
]
+
+/**
+ * Some custom globals.
+ */
+taskRecurringScheduleJob.repeatInterval=10
Index: trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy (revision 198)
+++ trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy (revision 199)
@@ -31,5 +31,5 @@
if(taskRecurringScheduleInstance) {
try {
- taskRecurringScheduleInstance.delete()
+ taskRecurringScheduleInstance.delete(flush: true)
flash.message = "Recurring Schedule ${params.id} deleted"
redirect(action:list)
@@ -73,9 +73,9 @@
}
- Date originalDate = taskRecurringScheduleInstance.startDate
+ Date originalDate = taskRecurringScheduleInstance.nextTargetStartDate
taskRecurringScheduleInstance.properties = params // Domain object is now 'dirty'.
- Date newDate = taskRecurringScheduleInstance.startDate
+ Date newDate = taskRecurringScheduleInstance.nextTargetStartDate
- // If user changes startDate then ensure it is in the future, otherwise it's ok to keep the original date.
+ // If user changes nextTargetStartDate then ensure it is in the future, otherwise it's ok to keep the original date.
if(originalDate.getTime() != newDate.getTime())
{
@@ -83,5 +83,5 @@
{
status.setRollbackOnly() // Only allow the transaction to Rollback, preventing flush due to 'dirty'.
- taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture")
+ taskRecurringScheduleInstance.errors.rejectValue("nextTargetStartDate", "taskRecurring.nextTargetStartDate.NotInTheFuture")
render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
return
@@ -89,9 +89,8 @@
}
- taskRecurringScheduleInstance.nextTargetStartDate = taskRecurringScheduleInstance.startDate
- taskRecurringScheduleInstance.setNextGenerationDate()
+ taskRecurringScheduleInstance.setNextGenerationDate()
taskRecurringScheduleInstance.setNextTargetCompletionDate()
- if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true))
+ if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true))
{
flash.message = "Recurring Schedule ${params.id} updated"
@@ -121,5 +120,5 @@
catch(Exception e) {
flash.message = "Please select a task, then Create a Recurring Schedule for it"
- redirect(controller:"taskDetailed", action:"list")
+ redirect(controller:"taskDetailed", action:"search")
}
} // end create()
@@ -135,6 +134,6 @@
else {
- if(taskRecurringScheduleInstance.startDate < dateUtilService.getToday()) {
- taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture")
+ if(taskRecurringScheduleInstance.nextTargetStartDate < dateUtilService.getToday()) {
+ taskRecurringScheduleInstance.errors.rejectValue("nextTargetStartDate", "taskRecurring.nextTargetStartDate.NotInTheFuture")
}
Index: trunk/grails-app/domain/Period.groovy
===================================================================
--- trunk/grails-app/domain/Period.groovy (revision 198)
+++ trunk/grails-app/domain/Period.groovy (revision 199)
@@ -3,8 +3,4 @@
String period
boolean isActive = true
-
- static hasMany = [taskRecurringSchedules: TaskRecurringSchedule]
-
- static mappedBy = [taskRecurringSchedules:"recurPeriod"]
// static belongsTo = []
Index: trunk/grails-app/domain/TaskRecurringSchedule.groovy
===================================================================
--- trunk/grails-app/domain/TaskRecurringSchedule.groovy (revision 198)
+++ trunk/grails-app/domain/TaskRecurringSchedule.groovy (revision 199)
@@ -5,5 +5,4 @@
Task lastGeneratedSubTask
Period recurPeriod
- Period generateAheadPeriod
Period taskDurationPeriod
@@ -11,10 +10,9 @@
Integer taskDuration = 0
Integer generateAhead = 1
- Date startDate = new Date()
- Date lastGeneratedDate
+ Integer subTasksGenerated = 0
+ Date nextGenerationDate = new Date()
Date nextTargetStartDate = new Date()
Date nextTargetCompletionDate = new Date()
- Date nextGenerationDate = new Date()
- boolean isEnabled = true
+ boolean enabled = true
// static hasMany = []
@@ -25,6 +23,5 @@
recurEvery(min:1, max:365)
taskDuration(min:0, max:365)
- generateAhead(min:0, max:365)
- lastGeneratedDate(nullable:true)
+ generateAhead(min:0, max:62)
lastGeneratedSubTask(nullable:true)
}
@@ -38,33 +35,39 @@
// in the hope that this will be fixed in future versions.
def beforeInsert = {
- nextTargetStartDate = startDate
setNextGenerationDate()
setNextTargetCompletionDate()
}
- public void setNextGenerationDate() {
- switch (generateAheadPeriod.period) {
+ public void setNextTargetStartDate() {
+ switch (recurPeriod.period) {
case "Day(s)":
use(TimeCategory) {
- nextGenerationDate = nextTargetStartDate - generateAhead.days
+ nextTargetStartDate = nextTargetStartDate + recurEvery.days
}
break
case "Week(s)":
use(TimeCategory) {
- nextGenerationDate = nextTargetStartDate - generateAhead.weeks
+ nextTargetStartDate = nextTargetStartDate + recurEvery.weeks
}
break
case "Month(s)":
use(TimeCategory) {
- nextGenerationDate = nextTargetStartDate - generateAhead.months
+ nextTargetStartDate = nextTargetStartDate + recurEvery.months
}
break
case "Year(s)":
use(TimeCategory) {
- nextGenerationDate = nextTargetStartDate - generateAhead.years
+ nextTargetStartDate = nextTargetStartDate + recurEvery.years
}
break
default:
+ log.error "No case for recurPeriod.period: ${recurPeriod.period}"
break
+ }
+ }
+
+ public void setNextGenerationDate() {
+ use(TimeCategory) {
+ nextGenerationDate = nextTargetStartDate - generateAhead.days
}
def now = new Date()
@@ -95,4 +98,5 @@
break
default:
+ log.error "No case for taskDurationPeriod.period: ${taskDurationPeriod.period}"
break
}
Index: trunk/grails-app/i18n/messages.properties
===================================================================
--- trunk/grails-app/i18n/messages.properties (revision 198)
+++ trunk/grails-app/i18n/messages.properties (revision 199)
@@ -42,7 +42,7 @@
task.leadPerson.help=The primay contact person.
-taskRecurring.startDate.NotInTheFuture=Please select a start date that is not in the past, or use original date.
-taskRecurring.startDate=Start Date
-taskRecurring.startDate.help=The tartget start date for the first auto generated subTask.
+taskRecurring.nextTargetStartDate.NotInTheFuture=Please select a start date that is not in the past, or use original date.
+taskRecurring.nextTargetStartDate=Next Target Start Date
+taskRecurring.nextTargetStartDate.help=The target start date for the next auto generated subTask.
task.primaryAsset=Primary Asset
Index: trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy
===================================================================
--- trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy (revision 198)
+++ trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy (revision 199)
@@ -1,47 +1,34 @@
+import org.codehaus.groovy.grails.commons.*
-class TaskRecurringScheduleJob {/*
- def timeout = 1000 // execute job once in 1 seconds
-// def timeout = 60000
+/**
+* Provides a quartz job that reviews and generates all recurring tasks.
+* The quartz scheduler is restarted if this file is edited so startDelay will then delay again.
+* The execute method is called once every repeatInterval (in milliseconds).
+* With concurrent=false the repeat interval starts counting after the previous job completes.
+* Apparently we need a hibernate session otherwise we get a LazyInitializationException, default is true but we specify it to be sure.
+*/
+class TaskRecurringScheduleJob {
+
+ def taskRecurringScheduleService
+
+ def concurrent = false
+ def sessionRequired = true
+
+ static triggers = {
+ simple name: "GenerateAll",
+ startDelay: 60000,
+ repeatInterval: ConfigurationHolder.config.taskRecurringScheduleJob.repeatInterval*1000
+ }
def execute() {
- println "TaskRecurringScheduleJob: tick"
- println "TaskRecurringScheduleJob: tock"/*
- def recurringScheduleInstanceList = RecurringSchedule.list()
- def now = new Date()
- recurringScheduleInstanceList.each() {
+ // Some information can be accessed if we run with "def execute(context) ".
+ // For more info see: http://quartz.sourceforge.net/javadoc/org/quartz/JobExecutionContext.html
+ // log.debug context.getTrigger()
+ // log.debug context.getPreviousFireTime()
+ // log.debug context.getFireTime()
- if ( now > it.nextDueDate) {
- def taskInstance = it.task
- def subTaskInstance = new Task()
-
- //Make our new Task a subTask.
- subTaskInstance.parentTask = taskInstance
-
- // Set the required properties
- subTaskInstance.description = "Generated recurring task: "+taskInstance.description
- subTaskInstance.comment = taskInstance.comment
- subTaskInstance.taskGroup = taskInstance.taskGroup
- subTaskInstance.taskStatus = TaskStatus.findByName("Not Started")
- subTaskInstance.taskPriority = TaskPriority.get(2)
- subTaskInstance.taskType = TaskType.get(1)
- subTaskInstance.leadPerson = taskInstance.leadPerson
- subTaskInstance.save()
-// if(subTaskInstance.save()){println "yes"}
-
- //Set the assignedPersons
- taskInstance.assignedPersons.each() {
-
- def assignedPerson = new AssignedPerson(person: it.person,
- task: subTaskInstance,
- estimatedHour: it.estimatedHour,
- estimatedMinute: it.estimatedMinute).save()
- }
-
- //Set the nextDueDate so that we don't loop ;-)
- it.nextDueDate = it.nextDueDate + 1
-
- }
- }//recurringScheduleInstanceList.each()
- }*/
+ // We do everything via services, quartz just sets up and fires off the thread.
+ taskRecurringScheduleService.generateAll()
+ }
}
Index: trunk/grails-app/services/CreateDataService.groovy
===================================================================
--- trunk/grails-app/services/CreateDataService.groovy (revision 198)
+++ trunk/grails-app/services/CreateDataService.groovy (revision 199)
@@ -18,13 +18,18 @@
/**
- * Always call this at startup to ensure admin access.
+ * Always call this at startup to ensure that we have admin access
+ * and that the system pseudo person is available.
*/
- def ensureAdminAccess() {
+ def ensureSystemAndAdminAccess() {
if(!Authority.findByAuthority("ROLE_AppAdmin") ) {
- println "ROLE_AppAdmin not found, calling createAdminAuthority()."
+ log.warn "ROLE_AppAdmin not found, calling createAdminAuthority()."
createAdminAuthority()
}
+ if(!Person.findByloginName("system") ) {
+ log.warn "LoginName 'system' not found, calling createSystemPerson()."
+ createSystemPerson()
+ }
if(!Person.findByloginName("admin") ) {
- println "LoginName 'admin' not found, calling createAdminPerson()."
+ log.warn "LoginName 'admin' not found, calling createAdminPerson()."
createAdminPerson()
}
@@ -35,9 +40,8 @@
*/
def createBaseData() {
- println "Creating base data..."
+ log.info "Creating base data..."
// Person and Utils
createBaseAuthorities()
createBasePersonGroups()
- createBasePersons()
createBaseUnitsOfMeasure()
createBasePeriods()
@@ -64,5 +68,5 @@
*/
def createDemoData() {
- println "Creating demo data..."
+ log.info "Creating demo data..."
// Person and Utils
createDemoPersons()
@@ -148,4 +152,22 @@
}
+ def createSystemPerson() {
+ //Person
+ def passClearText = "pass"
+ def passwordEncoded = personService.encodePassword(passClearText)
+ def personInstance
+
+ //Person #1
+ personInstance = new Person(loginName:"system",
+ firstName:"gnuMims",
+ lastName:"System",
+ description:'''This is a pseudo person that the application uses to insert data. DO NOT
+ assign login authorities or change the details of this person.''',
+ pass:passClearText,
+ password:passwordEncoded,
+ email:"system@example.com")
+ saveAndTest(personInstance)
+ }
+
def createAdminPerson() {
//Person
@@ -154,8 +176,10 @@
def personInstance
- //Person #1
+ //Person #2
personInstance = new Person(loginName:"admin",
firstName:"Admin",
lastName:"Powers",
+ description:'''Every time the application starts it ensures that the 'admin' login name is available.
+ DO update the password and other details but keep the login name as 'admin'. ''',
pass:passClearText,
password:passwordEncoded,
@@ -166,4 +190,7 @@
def createBasePersons() {
+ }
+
+ def createDemoPersons() {
//Person
def passClearText = "pass"
@@ -171,7 +198,8 @@
def personInstance
- //Person #1 is admin.
-
- //Person #2
+ //Person #1 is system.
+ //Person #2 is admin.
+
+ //Person #3
personInstance = new Person(loginName:"manager",
firstName:"Demo",
@@ -185,5 +213,5 @@
personInstance.addToPersonGroups(PersonGroup.get(5))
- //Person #3
+ //Person #4
personInstance = new Person(loginName:"user",
firstName:"Demo",
@@ -195,13 +223,6 @@
personInstance.addToAuthorities(Authority.get(3))
personInstance.addToPersonGroups(PersonGroup.get(1))
- }
-
- def createDemoPersons() {
- //Person
- def passClearText = "pass"
- def passwordEncoded = personService.encodePassword(passClearText)
- def personInstance
-
- //Person #4
+
+ //Person #5
personInstance = new Person(loginName:"craig",
firstName:"Craig",
@@ -214,5 +235,5 @@
personInstance.addToPersonGroups(PersonGroup.get(1))
- //Person #5
+ //Person #6
personInstance = new Person(loginName:"john",
firstName:"John",
@@ -225,5 +246,5 @@
personInstance.addToPersonGroups(PersonGroup.get(2))
- //Person #6
+ //Person #7
personInstance = new Person(loginName:"mann",
firstName:"Production",
@@ -425,14 +446,14 @@
def taskPriorityInstance
- taskPriorityInstance = new TaskPriority(name:"Normal")
+ taskPriorityInstance = new TaskPriority(name:"Normal") // #1
saveAndTest(taskPriorityInstance)
- taskPriorityInstance = new TaskPriority(name:"Low")
+ taskPriorityInstance = new TaskPriority(name:"Low") // #2
saveAndTest(taskPriorityInstance)
- taskPriorityInstance = new TaskPriority(name:"High")
+ taskPriorityInstance = new TaskPriority(name:"High") // #3
saveAndTest(taskPriorityInstance)
- taskPriorityInstance = new TaskPriority(name:"Immediate")
+ taskPriorityInstance = new TaskPriority(name:"Immediate") // #4
saveAndTest(taskPriorityInstance)
}
@@ -443,17 +464,17 @@
def taskTypeInstance
- taskTypeInstance = new TaskType(name:"Unscheduled Breakin")
+ taskTypeInstance = new TaskType(name:"Unscheduled Breakin") // #1
saveAndTest(taskTypeInstance)
- taskTypeInstance = new TaskType(name:"Preventative Maintenance")
+ taskTypeInstance = new TaskType(name:"Preventative Maintenance") // #2
saveAndTest(taskTypeInstance)
- taskTypeInstance = new TaskType(name:"Project")
+ taskTypeInstance = new TaskType(name:"Project") // #3
saveAndTest(taskTypeInstance)
- taskTypeInstance = new TaskType(name:"Turnaround")
+ taskTypeInstance = new TaskType(name:"Turnaround") // #4
saveAndTest(taskTypeInstance)
- taskTypeInstance = new TaskType(name:"Production Run")
+ taskTypeInstance = new TaskType(name:"Production Run") // #5
saveAndTest(taskTypeInstance)
}
@@ -481,5 +502,4 @@
//Task #1
p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
- taskStatus:TaskStatus.findByName("Not Started"),
taskPriority:TaskPriority.get(2),
taskType:TaskType.get(1),
@@ -493,5 +513,4 @@
//Task #2
p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
- taskStatus:TaskStatus.findByName("Not Started"),
taskPriority:TaskPriority.get(2),
taskType:TaskType.get(1),
@@ -506,5 +525,4 @@
//Task #3
p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
- taskStatus:TaskStatus.findByName("Not Started"),
taskPriority:TaskPriority.get(2),
taskType:TaskType.get(1),
@@ -519,5 +537,4 @@
//Task #4
p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
- taskStatus:TaskStatus.findByName("Not Started"),
taskPriority:TaskPriority.get(2),
taskType:TaskType.get(1),
@@ -532,5 +549,4 @@
//Task #5
p = [taskGroup:TaskGroup.findByName("Production Activites"),
- taskStatus:TaskStatus.findByName("Not Started"),
taskPriority:TaskPriority.get(2),
taskType:TaskType.get(5),
@@ -538,17 +554,16 @@
description:"Production Report",
comment:"Production report for specific production run or shift",
- targetStartDate:new Date()-7]
+ targetStartDate:new Date()-6]
taskResult = taskService.create(p)
//Task #6
- p = [taskGroup:TaskGroup.findByName("New Projects"),
- taskStatus:TaskStatus.findByName("Not Started"),
- taskPriority:TaskPriority.get(2),
- taskType:TaskType.get(3),
- leadPerson:Person.get(1),
- description:"Make killer CMMS app",
- comment:"Use Grails and get a move on!",
- targetStartDate:new Date()-6]
+ p = [taskGroup:TaskGroup.findByName("Engineering Activites"),
+ taskPriority:TaskPriority.get(1),
+ taskType:TaskType.get(2),
+ leadPerson:Person.get(4),
+ description:"This is a recurring task",
+ 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.",
+ targetStartDate:new Date()]
taskResult = taskService.create(p)
@@ -631,21 +646,21 @@
taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(1),
recurEvery: 1,
- recurPeriod: Period.get(1),
- startDate: new Date(),
+ recurPeriod: Period.get(2),
+ nextTargetStartDate: new Date(),
generateAhead: 1,
- generateAheadPeriod: Period.get(1),
- taskDuration: 1,
- taskDurationPeriod: Period.get(1))
+ taskDuration: 2,
+ taskDurationPeriod: Period.get(1),
+ enabled: false)
saveAndTest(taskRecurringScheduleInstance)
//TaskRecurringSchedule #2
- taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(2),
+ taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(6),
recurEvery: 1,
recurPeriod: Period.get(1),
- startDate: new Date(),
+ nextTargetStartDate: new Date(),
generateAhead: 1,
- generateAheadPeriod: Period.get(1),
taskDuration: 1,
- taskDurationPeriod: Period.get(1))
+ taskDurationPeriod: Period.get(1),
+ enabled: true)
saveAndTest(taskRecurringScheduleInstance)
}
@@ -1051,6 +1066,6 @@
if(!object.save()) {
// DemoDataSuccessful = false
- println "'${object}' failed to save!"
- println object.errors
+ log.error "'${object}' failed to save!"
+ log.error object.errors
return false
}
Index: trunk/grails-app/services/TaskRecurringScheduleService.groovy
===================================================================
--- trunk/grails-app/services/TaskRecurringScheduleService.groovy (revision 199)
+++ trunk/grails-app/services/TaskRecurringScheduleService.groovy (revision 199)
@@ -0,0 +1,35 @@
+class TaskRecurringScheduleService {
+
+ boolean transactional = false
+
+ def dateUtilService
+ def taskService
+
+ def generateAll() {
+
+ /// @todo: disable recurringSchedule when moving a task to trash.
+ def taskRecurringScheduleList = TaskRecurringSchedule.findAllByEnabled(true)
+
+ taskRecurringScheduleList.each() {
+
+ if ( dateUtilService.getTomorrow() > it.nextGenerationDate) {
+ def p = [:]
+ p.targetStartDate = it.nextTargetStartDate
+ p.targetCompletionDate = it.nextTargetCompletionDate
+ def result = taskService.createSubTask(it.task, p)
+ if( !result.error ) {
+ it.lastGeneratedSubTask = result.taskInstance
+ it.subTasksGenerated++
+ it.setNextTargetStartDate()
+ it.setNextGenerationDate()
+ it.setNextTargetCompletionDate()
+ }
+ else {
+ log.error result
+ }
+ }
+
+ }
+ }
+
+} // end of class
Index: trunk/grails-app/views/taskDetailed/show.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/show.gsp (revision 198)
+++ trunk/grails-app/views/taskDetailed/show.gsp (revision 199)
@@ -462,14 +462,28 @@
${taskRecurringScheduleInstance.encodeAsHTML()}
-
-
-
-
- Start Date:
+
+
+
+ Next Generation Date:
-
+
-
+
+
+
+ Generate Ahead:
+
+
+ ${taskRecurringScheduleInstance?.generateAhead} ${Period.get(1).encodeAsHTML()}
+
+
+
+
+ Next Target Start Date:
+
+
+
+
@@ -483,71 +497,17 @@
- Generate Ahead:
-
-
- ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod}
-
-
-
-
-
-
-
- Is Enabled:
-
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}
-
-
-
-
-
-
-
-
-
-
- Next Target Start Date:
-
-
-
-
-
-
-
-
- Next Target Completion Date:
+ Next Target Completion Date:
-
-
-
-
- Next Generation Date:
-
-
-
-
-
-
-
- Last Generated Date:
-
-
-
-
-
-
-
-
- Last Generated Sub Task:
-
-
-
- ${taskRecurringScheduleInstance?.lastGeneratedSubTask?.encodeAsHTML()}
-
-
-
+
+
+
+ Enabled:
+
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}
+
+
@@ -557,4 +517,5 @@
+
Index: trunk/grails-app/views/taskRecurringSchedule/create.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringSchedule/create.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringSchedule/create.gsp (revision 199)
@@ -55,13 +55,4 @@
- Last Generated Date:
-
-
-
-
-
-
-
-
Last Generated Sub Task:
@@ -73,17 +64,8 @@
- Generate Ahead Period:
+ Enabled:
-
-
-
-
-
-
-
- Is Enabled:
-
-
-
+
+
@@ -127,8 +109,8 @@
- Start Date:
+ Sub Tasks Generated:
-
-
+
+
Index: trunk/grails-app/views/taskRecurringSchedule/edit.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringSchedule/edit.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringSchedule/edit.gsp (revision 199)
@@ -58,13 +58,4 @@
- Last Generated Date:
-
-
-
-
-
-
-
-
Last Generated Sub Task:
@@ -76,17 +67,8 @@
- Generate Ahead Period:
+ Enabled:
-
-
-
-
-
-
-
- Is Enabled:
-
-
-
+
+
@@ -130,8 +112,8 @@
- Start Date:
+ Sub Tasks Generated:
-
-
+
+
Index: trunk/grails-app/views/taskRecurringSchedule/list.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringSchedule/list.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringSchedule/list.gsp (revision 199)
@@ -29,8 +29,8 @@
-
-
Last Generated Sub Task
+
+
@@ -47,7 +47,7 @@
${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedDate')}
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}
Index: trunk/grails-app/views/taskRecurringSchedule/show.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringSchedule/show.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringSchedule/show.gsp (revision 199)
@@ -51,11 +51,4 @@
- Last Generated Date:
-
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedDate')}
-
-
-
-
Last Generated Sub Task:
@@ -65,14 +58,7 @@
- Generate Ahead Period:
+ Enabled:
- ${taskRecurringScheduleInstance?.generateAheadPeriod?.encodeAsHTML()}
-
-
-
-
- Is Enabled:
-
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}
@@ -107,7 +93,7 @@
- Start Date:
+ Sub Tasks Generated:
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'startDate')}
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'subTasksGenerated')}
Index: trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp (revision 199)
@@ -38,8 +38,8 @@
- Start Date:
+ Next Target Start Date:
-
-
+
+
@@ -74,5 +74,5 @@
-
+ ${Period.get(1).encodeAsHTML()}
@@ -80,8 +80,8 @@
- Is Enabled:
+ Enabled:
-
-
+
+
Index: trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp (revision 199)
@@ -39,8 +39,8 @@
- Start Date:
+ Next Target Start Date:
-
-
+
+
@@ -75,5 +75,5 @@
-
+ ${Period.get(1).encodeAsHTML()}
@@ -81,8 +81,8 @@
- Is Enabled:
+ Enabled:
-
-
+
+
Index: trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp (revision 199)
@@ -29,5 +29,5 @@
-
+
@@ -48,5 +48,5 @@
${fieldValue(bean:taskRecurringScheduleInstance, field:'recurPeriod')}
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}
Index: trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp
===================================================================
--- trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp (revision 198)
+++ trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp (revision 199)
@@ -13,116 +13,123 @@
- ${flash.message}
+ ${flash.message}
-
-
+
- Id:
-
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'id')}
-
+ Recurring Schedule for task:
+
+
+
+ ${taskRecurringScheduleInstance.task.encodeAsHTML()}
+
+
-
-
- Recurring Schedule for Task:
-
-
- ${taskRecurringScheduleInstance?.task?.encodeAsHTML()}
-
-
-
- Start Date:
-
-
-
-
+
+
+ ${taskRecurringScheduleInstance.encodeAsHTML()}
-
-
- Recur Every:
-
-
- ${taskRecurringScheduleInstance?.recurEvery} ${taskRecurringScheduleInstance?.recurPeriod}
-
-
-
-
-
- Task Duration:
-
-
- ${taskRecurringScheduleInstance?.taskDuration} ${taskRecurringScheduleInstance?.taskDurationPeriod}
-
-
-
-
- Generate Ahead:
-
-
- ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod}
-
-
-
-
-
- Is Enabled:
-
- ${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}
-
-
-
-
-
-
-
-
- Next Target Start Date:
-
-
-
-
-
-
-
-
- Next Target Completion Date:
-
-
-
-
-
-
-
+
Next Generation Date:
-
+
-
+
- Last Generated Date:
-
+ Generate Ahead:
+
-
-
+ ${taskRecurringScheduleInstance.generateAhead} ${Period.get(1).encodeAsHTML()}
+
-
+
- Last Generated Sub Task:
-
+ Next Target Start Date:
+
-
- ${taskRecurringScheduleInstance?.lastGeneratedSubTask?.encodeAsHTML()}
-
-
-
+
+
-
+
+
+ Task Duration:
+
+
+ ${taskRecurringScheduleInstance.taskDuration} ${taskRecurringScheduleInstance.taskDurationPeriod}
+
+
+
+
+ Next Target Completion Date:
+
+
+
+
+
+
+
+ Enabled:
+
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'enabled')}
+
+
+
+
+
+
+
+
+ Note:
+
+
+ Recurring Schedules are reviewed and Sub Tasks generated every ${grailsApplication.config.taskRecurringScheduleJob.repeatInterval.encodeAsHTML()} seconds.
+
+
+
+
+ Sub Tasks Generated:
+
+
+ ${fieldValue(bean:taskRecurringScheduleInstance, field:'subTasksGenerated')}
+
+
+
+
+
+
+ Last Generated Sub Task:
+
+
+
+ ${taskRecurringScheduleInstance.lastGeneratedSubTask?.encodeAsHTML()}
+
+
+
+
+
+
+
+
+ ${TaskModification.findByTaskAndTaskModificationType(taskRecurringScheduleInstance.lastGeneratedSubTask, TaskModificationType.get(1))}
+
+
+
+
+
+
+
+ With target start date:
+
+
+
+
+
+
@@ -130,5 +137,5 @@
-
+