Index: /trunk/.classpath
===================================================================
--- /trunk/.classpath	(revision 136)
+++ /trunk/.classpath	(revision 137)
@@ -13,74 +13,74 @@
 <classpathentry kind="output" path="web-app/WEB-INF/classes"/>
 <classpathentry kind="var" path="GRAILS_HOME/ant/lib/ant.jar"/>
+<classpathentry kind="var" path="GRAILS_HOME/lib/slf4j-api-1.5.6.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-runtime-5.5.15.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/sitemesh-2.4.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-codec-1.3.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/oro-2.0.8.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/backport-util-concurrent-3.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-dbcp-1.2.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/start.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ant-junit-1.7.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ant-1.7.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/hsqldb-1.8.0.5.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-plus-6.1.14.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/slf4j-log4j12-1.5.6.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/junit-3.8.2.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/spring-webmvc-2.5.6.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.webflow-2.0.3.RELEASE.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.4.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ehcache-1.5.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/xpp3_min-1.1.3.4.O.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ivy-2.0.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-util-6.1.14.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jline-0.9.91.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-naming-6.1.14.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ant-nodeps-1.7.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-collections-3.2.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.4.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/spring-2.5.6.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler-jdt-5.5.15.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/log4j-1.2.15.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/groovy-all-1.6.3.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/svnkit-1.2.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jcl-over-slf4j-1.5.6.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jta-1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-6.1.14.jar" />
 <classpathentry kind="var" path="GRAILS_HOME/lib/cglib-nodep-2.1_3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-junit-1.7.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.webflow-2.0.3.RELEASE.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/junit-3.8.2.jar" />
 <classpathentry kind="var" path="GRAILS_HOME/lib/spring-test-2.5.6.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.3.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-el-1.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.binding-2.0.3.RELEASE.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-validator-1.3.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/oscache-2.4.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.js-2.0.3.RELEASE.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/serializer.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ognl-2.6.9.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ant-trax.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ant-launcher-1.7.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jsr107cache-1.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-fileupload-1.2.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.3.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/servlet-api-2.5-6.1.14.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler-5.5.15.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-lang-2.4.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/ejb3-persistence-3.3.0.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/commons-beanutils-1.7.0.jar" />
 <classpathentry kind="var" path="GRAILS_HOME/lib/commons-io-1.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-collections-3.2.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jcl-over-slf4j-1.5.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/spring-webmvc-2.5.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-validator-1.3.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-util-6.1.14.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jta-1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/lib/gant_groovy1.6-1.6.0.jar" />
 <classpathentry kind="var" path="GRAILS_HOME/lib/antlr-2.7.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.0.jar" />
 <classpathentry kind="var" path="GRAILS_HOME/lib/commons-cli-1.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/servlet-api-2.5-6.1.14.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/oscache-2.4.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/slf4j-api-1.5.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ivy-2.0.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-1.7.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/start.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-nodeps-1.7.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ehcache-1.5.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/hsqldb-1.8.0.5.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-el-1.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/groovy-all-1.6.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/serializer.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jsr107cache-1.0.jar" />
 <classpathentry kind="var" path="GRAILS_HOME/lib/commons-pool-1.2.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-lang-2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.js-2.0.3.RELEASE.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-beanutils-1.7.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-plus-6.1.14.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/oro-2.0.8.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/slf4j-log4j12-1.5.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/backport-util-concurrent-3.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jline-0.9.91.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-runtime-5.5.15.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-trax.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/log4j-1.2.15.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/xpp3_min-1.1.3.4.O.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-fileupload-1.1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler-5.5.15.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/gant_groovy1.6-1.6.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-naming-6.1.14.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-dbcp-1.2.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler-jdt-5.5.15.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/commons-codec-1.3.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.binding-2.0.3.RELEASE.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/spring-2.5.6.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ognl-2.6.9.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/svnkit-1.2.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/sitemesh-2.4.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-6.1.14.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ant-launcher-1.7.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/lib/ejb3-persistence-3.3.0.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-spring-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-crud-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-web-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-bootstrap-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-webflow-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-resources-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-gorm-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-test-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-scripts-1.1.jar" />
-<classpathentry kind="var" path="GRAILS_HOME/dist/grails-core-1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-test-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-scripts-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-bootstrap-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-gorm-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-resources-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-crud-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-webflow-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-core-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-spring-1.1.1.jar" />
+<classpathentry kind="var" path="GRAILS_HOME/dist/grails-web-1.1.1.jar" />
 </classpath>
Index: /trunk/README
===================================================================
--- /trunk/README	(revision 136)
+++ /trunk/README	(revision 137)
@@ -1,2 +1,5 @@
+    GnuMims - A web application providing a Maintenance and Inventory Management Solution.
+    Copyright (C) <2009>  <Gavin Kromhout>
+ 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU Affero General Public License as published by
Index: /trunk/application.properties
===================================================================
--- /trunk/application.properties	(revision 136)
+++ /trunk/application.properties	(revision 137)
@@ -1,4 +1,4 @@
 #utf-8
-#Mon May 04 19:08:49 EST 2009
+#Tue May 19 13:36:38 EST 2009
 plugins.acegi=0.5.1
 app.version=
@@ -7,5 +7,5 @@
 plugins.richui=0.6
 app.servlet.version=2.4
-plugins.hibernate=1.1
+plugins.hibernate=1.1.1
 app.name=gnuMims
-app.grails.version=1.1
+app.grails.version=1.1.1
Index: /trunk/gnuMims.launch
===================================================================
--- /trunk/gnuMims.launch	(revision 136)
+++ /trunk/gnuMims.launch	(revision 137)
@@ -10,6 +10,6 @@
 <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;gnuMims&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.1.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.0.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.1.1.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
 </listAttribute>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
Index: /trunk/grails-app/conf/BootStrap.groovy
===================================================================
--- /trunk/grails-app/conf/BootStrap.groovy	(revision 136)
+++ /trunk/grails-app/conf/BootStrap.groovy	(revision 137)
@@ -358,5 +358,5 @@
 
         //Entry #1
-        entryInstance = new Entry(enteredBy: Person.get(6),
+        entryInstance = new Entry(enteredBy: Person.get(3),
                                                     task: Task.get(1),
                                                     entryType: EntryType.findByName("Fault"),
@@ -611,5 +611,5 @@
 
         //MaintenanceAction #1
-        maintenanceActionInstance = new MaintenanceAction(description: "Check all E-stops, active E-stop S1-S12 and ensure machine cannot run",
+        maintenanceActionInstance = new MaintenanceAction(description: "Check all E-stops, activate E-stops S1-S12 and ensure machine cannot run",
                                                                                                         procedureStepNumber: 1,
                                                                                                         maintenancePolicy: MaintenancePolicy.get(1),
Index: /trunk/grails-app/controllers/TaskDetailedController.groovy
===================================================================
--- /trunk/grails-app/controllers/TaskDetailedController.groovy	(revision 136)
+++ /trunk/grails-app/controllers/TaskDetailedController.groovy	(revision 137)
@@ -31,4 +31,16 @@
 			params.order = "desc"
 			params.sort = "id"
+			
+			def entryWorkDoneList = Entry.withCriteria {
+																def entryType = EntryType.findByName("WorkDone")
+																eq("entryType", entryType)
+																eq("task", taskInstance)
+														}
+			
+			def entryFaultList = Entry.withCriteria {
+																def entryType = EntryType.findByName("Fault")
+																eq("entryType", entryType)
+																eq("task", taskInstance)
+														}
 
 			def subTaskInstanceList = Task.findAllByParentTask(taskInstance, params)
@@ -53,5 +65,7 @@
             }
 			
-            return [ taskInstance : taskInstance,
+            return [ taskInstance: taskInstance,
+							entryWorkDoneList: entryWorkDoneList,
+	   						entryFaultList: entryFaultList,
                             taskProcedureInstance: taskProcedureInstance,
                             taskProcedureExits: taskProcedureExits,
Index: /trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy
===================================================================
--- /trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy	(revision 136)
+++ /trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy	(revision 137)
@@ -1,7 +1,10 @@
 import org.codehaus.groovy.grails.plugins.springsecurity.Secured
 import org.codehaus.groovy.runtime.TimeCategory
+import java.text.SimpleDateFormat
 
 class TaskRecurringScheduleDetailedController extends BaseController {
     
+	def dateUtilService
+	
     def index = { redirect(action:list,params:params) }
 
@@ -51,36 +54,61 @@
         }
         else {
-            return [ taskRecurringScheduleInstance : taskRecurringScheduleInstance ]
+            return [ taskRecurringScheduleInstance : taskRecurringScheduleInstance]
         }
     }
 
     def update = {
-        def taskRecurringScheduleInstance = TaskRecurringSchedule.get( params.id )
-        if(taskRecurringScheduleInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(taskRecurringScheduleInstance.version > version) {
+		TaskRecurringSchedule.withTransaction { status ->
+        
+        	def taskRecurringScheduleInstance = TaskRecurringSchedule.get( params.id )
+			if(taskRecurringScheduleInstance) {
+				
+				if(params.version) {
+					def version = params.version.toLong()
+					if(taskRecurringScheduleInstance.version > version) {
+						taskRecurringScheduleInstance.errors.rejectValue("version", "taskRecurringSchedule.optimistic.locking.failure", "Another user has updated this TaskRecurringSchedule while you were editing.")
+						render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
+						return
+					}
+				}
+					
+				Date originalDate = taskRecurringScheduleInstance.startDate
+				taskRecurringScheduleInstance.properties = params  // Domain object is now 'dirty'.
+				Date newDate = taskRecurringScheduleInstance.startDate
+	
+				// If user changes startDate then ensure it is in the future, otherwise it's ok to keep the original date.
+				if(originalDate.getTime() != newDate.getTime())
+				{
+					if(newDate < dateUtilService.getToday()) 
+					{
+						status.setRollbackOnly()  // Only allow the transaction to Rollback, preventing flush due to 'dirty'.
+						taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture")
+						render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
+						return
+					}
+				}
+					
+				taskRecurringScheduleInstance.nextTargetStartDate = taskRecurringScheduleInstance.startDate
+				taskRecurringScheduleInstance.setNextGenerationDate() 
+				taskRecurringScheduleInstance.setNextTargetCompletionDate()
                     
-                    taskRecurringScheduleInstance.errors.rejectValue("version", "taskRecurringSchedule.optimistic.locking.failure", "Another user has updated this TaskRecurringSchedule while you were editing.")
-                    render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
-                    return
-                }
-            }
-//             taskRecurringScheduleInstance.properties = params
-            setUpdateProperties()
-                    
-            if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save()) {
-                flash.message = "TaskRecurringSchedule ${params.id} updated"
-                redirect(action:show,id:taskRecurringScheduleInstance.id)
-            }
-            else {
-                render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
-            }
-        }
-        else {
-            flash.message = "TaskRecurringSchedule not found with id ${params.id}"
-            redirect(action:edit,id:params.id)
-        }
-    }
+				if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save()) 
+				{
+					flash.message = "TaskRecurringSchedule ${params.id} updated"
+					redirect(action:show,id:taskRecurringScheduleInstance.id)
+				}
+				else 
+				{
+					render(view:'edit',model:[taskRecurringScheduleInstance:taskRecurringScheduleInstance])
+				}
+			}
+			else 
+			{
+				flash.message = "TaskRecurringSchedule not found with id ${params.id}"
+				redirect(action:edit,id:params.id)
+			}
+			
+		} // end withTransaction			
+	} // end update()
 	
     def create = {
@@ -95,5 +123,5 @@
             redirect(controller:"taskDetailed", action:"list")
         }
-    }
+    } // end create()
 
     def save = {
@@ -106,4 +134,8 @@
 		}
 		else {
+			
+			if(taskRecurringScheduleInstance.startDate < dateUtilService.getToday()) {
+				taskRecurringScheduleInstance.errors.rejectValue("startDate", "taskRecurring.startDate.NotInTheFuture")
+			}
 			
 			if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save()) {
@@ -125,48 +157,5 @@
 		}
 
-    }
-                
-    private setUpdateProperties() {
-        def originalStartDate = taskRecurringScheduleInstance.startDate
-        
-        if(taskRecurringScheduleInstance.startDate == params.startDate) {
-            taskRecurringScheduleInstance.properties = params
-        }
-        else {
-            taskRecurringScheduleInstance.properties = params
-            taskRecurringScheduleInstance.nextTargetStartDate = params.startDate
-        }
-        
-    }
+    } // end save()
 
-/*    
-    private Date calculateNextDueDate(recurEvery, period, startDate) {
-        def nextDue = new Date()
-        
-        switch (period) {
-            case "Day(s)":
-                use(TimeCategory) {
-                    nextDue = startDate + recurEvery.days
-                }
-                return nextDue
-            case "Week(s)":
-                use(TimeCategory) {
-                    nextDue = startDate + recurEvery.weeks
-                }
-                return nextDue
-            case "Month(s)":
-                use(TimeCategory) {
-                    nextDue = startDate + recurEvery.months
-                }
-                return nextDue
-            case "Year(s)":
-                use(TimeCategory) {
-                    nextDue = startDate + recurEvery.years
-                }
-                return nextDue
-            default:
-                return nextDue
-        }
-        
-    }*/
 }
Index: /trunk/grails-app/domain/TaskRecurringSchedule.groovy
===================================================================
--- /trunk/grails-app/domain/TaskRecurringSchedule.groovy	(revision 136)
+++ /trunk/grails-app/domain/TaskRecurringSchedule.groovy	(revision 137)
@@ -23,6 +23,5 @@
 
     static constraints = {
-// 		startDate(validator: {return (it > new Date())})
-        recurEvery(min:0, max:365)
+        recurEvery(min:1, max:365)
         taskDuration(min:0, max:365)
         generateAhead(min:0, max:365)
@@ -35,12 +34,14 @@
     }
     
-    //As of Grails 1.1 this does not fire/pass before validation.
-    //But setting defaults above and placing this code here in the hope that this will be fixed in future versions.
+    // As of Grails 1.1.1 this does not fire/pass before validation.
+    // But setting some defaults above to pass validation and placing this code here 
+	// in the hope that this will be fixed in future versions.
     def beforeInsert = {
-        def now = new Date()
-        
         nextTargetStartDate = startDate
-        
-        //nextGenerationDate
+        setNextGenerationDate()
+        setNextTargetCompletionDate()
+    }
+    
+    public void setNextGenerationDate() {
         switch (generateAheadPeriod.period) {
             case "Day(s)":
@@ -67,8 +68,9 @@
                 break
         }
-        
+        def now = new Date()
         if( nextGenerationDate < now) {nextGenerationDate = now}
-        
-        //nextTargetCompletionDate
+    }
+    
+    public void setNextTargetCompletionDate() {
         switch (taskDurationPeriod.period) {
             case "Day(s)":
@@ -92,10 +94,9 @@
                 }
                 break
-        default:
+            default:
                 break
         }
-        
     }
-
+    
 }
 
Index: /trunk/grails-app/i18n/messages.properties
===================================================================
--- /trunk/grails-app/i18n/messages.properties	(revision 136)
+++ /trunk/grails-app/i18n/messages.properties	(revision 137)
@@ -18,4 +18,8 @@
 task.leadPerson=Lead Person
 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.
 
 default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}]
Index: /trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy
===================================================================
--- /trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy	(revision 136)
+++ /trunk/grails-app/jobs/TaskRecurringScheduleJob.groovy	(revision 137)
@@ -1,10 +1,10 @@
 
 class TaskRecurringScheduleJob {/*
-//     def timeout = 5000 // execute job once in 5 seconds
-    def timeout = 60000
+    def timeout = 1000 // execute job once in 1 seconds
+//     def timeout = 60000
 
     def execute() {
-//         println "TaskRecurringScheduleJob: tick"
-//         println "TaskRecurringScheduleJob: tock"
+        println "TaskRecurringScheduleJob: tick"
+        println "TaskRecurringScheduleJob: tock"/*
         def recurringScheduleInstanceList = RecurringSchedule.list()
         def now = new Date()
Index: /trunk/grails-app/services/DateUtilService.groovy
===================================================================
--- /trunk/grails-app/services/DateUtilService.groovy	(revision 137)
+++ /trunk/grails-app/services/DateUtilService.groovy	(revision 137)
@@ -0,0 +1,24 @@
+class DateUtilService {
+
+    boolean transactional = false
+    static scope = "request"
+	
+	public static Date getToday() {
+        return setMidnight(new Date())
+    }
+
+    public static Date getTomorrow() {
+        return (getToday() + 1) as Date
+    }
+
+    public static Date setMidnight(Date theDate) {
+        Calendar cal = Calendar.getInstance()
+        cal.setTime(theDate)
+        cal.set(Calendar.HOUR_OF_DAY, 0)
+        cal.set(Calendar.MINUTE, 0)
+        cal.set(Calendar.SECOND, 0)
+        cal.set(Calendar.MILLISECOND, 0)
+        cal.getTime()
+    }
+
+}
Index: /trunk/grails-app/services/TaskService.groovy
===================================================================
--- /trunk/grails-app/services/TaskService.groovy	(revision 137)
+++ /trunk/grails-app/services/TaskService.groovy	(revision 137)
@@ -0,0 +1,13 @@
+class TaskService {
+
+    boolean transactional = true
+    static scope = "request"
+
+	def dateUtilService
+
+    def taskDates(taskInstance, params) {
+		println "yes"
+		
+    }
+
+}
Index: /trunk/grails-app/views/entryDetailed/edit.gsp
===================================================================
--- /trunk/grails-app/views/entryDetailed/edit.gsp	(revision 136)
+++ /trunk/grails-app/views/entryDetailed/edit.gsp	(revision 137)
@@ -62,9 +62,9 @@
 
                                 <td valign="top" class="value">
-                                    <input class="duration ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" 
+                                    <input class="time ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" 
                                         type="text" id="durationHour" name="durationHour" 
                                         value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
                                     :
-                                    <input class="duration ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" 
+                                    <input class="time ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" 
                                         type="text" id="durationMinute" name="durationMinute" 
                                         value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
Index: /trunk/grails-app/views/taskDetailed/show.gsp
===================================================================
--- /trunk/grails-app/views/taskDetailed/show.gsp	(revision 136)
+++ /trunk/grails-app/views/taskDetailed/show.gsp	(revision 137)
@@ -158,5 +158,4 @@
                         </div>
             
-            
                         <div class="buttons">
                             <g:form>
@@ -186,6 +185,5 @@
                                 </thead>
                                 <tbody>
-                                <g:each in="${taskInstance?.entries}" status="i" var="entry">
-                                    <g:if test="${entry.entryType == EntryType.findByName('Fault')}">
+                                <g:each in="${entryFaultList}" status="i" var="entry">
                                         <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
                                         
@@ -202,5 +200,4 @@
             
                                         </tr>
-                                    </g:if>
                                 </g:each>
                                 </tbody>
@@ -227,6 +224,5 @@
                                 </thead>
                                 <tbody>
-                                <g:each in="${taskInstance?.entries}" status="i" var="entry">
-                                    <g:if test="${entry.entryType == EntryType.findByName('WorkDone')}">
+                                <g:each in="${entryWorkDoneList}" status="i" var="entry">
                                         <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/>
             
@@ -243,5 +239,4 @@
             
                                         </tr>
-                                    </g:if>
                                 </g:each>
                                 </tbody>
@@ -261,4 +256,6 @@
                     </richui:tabContent>
 <!-- End Task tab -->
+
+
 
 <!-- Start Task Procedure tab-->
@@ -398,4 +395,23 @@
 												<g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd MMM yyyy"/>
 											</td>
+                            
+                                        </tr>
+                                    
+                                        <tr class="prop">
+                                            <td valign="top" class="name">Task Duration:</td>
+                                            
+                                            <td valign="top" class="value">
+                                                ${taskRecurringScheduleInstance?.taskDuration} ${taskRecurringScheduleInstance?.taskDurationPeriod}
+                                            </td>
+                                        </tr>
+                    
+                                        <tr class="prop">
+                                            <td valign="top" class="name">Generate Ahead:</td>
+                                            
+                                            <td valign="top" class="value">
+                                                ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod}
+                                            </td>
+                                            
+                                        </tr>
 											
 										</tr>
@@ -407,21 +423,36 @@
 											
 										</tr>
+                                        
+                                    </tbody>
+                                </table>
+                
+                                <table>
+                                    <tbody>
                         
 										<tr class="prop">
-											<td></td>
-										</tr>
-										
-										<tr class="prop">
-											<td></td>
-										</tr>
-				
-										<tr class="prop">
-											<td valign="top" class="name">Next Due Date:</td>   
+											<td valign="top" class="name">Next Target Start Date:</td>   
 											                         
 											<td valign="top" class="value">
-												<g:formatDate date="${taskRecurringScheduleInstance.nextDueDate}" format="EEE, dd MMM yyyy"/>
+												<g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd MMM yyyy"/>
 											</td>
 											
 										</tr>
+                
+                                        <tr class="prop">
+                                            <td valign="top" class="name">Next Target Completion Date:</td>   
+                                                                     
+                                            <td valign="top" class="value">
+                                                <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd MMM yyyy"/>
+                                            </td>
+                                            
+                                        </tr>
+                        
+                                        <tr class="prop">
+                                            <td valign="top" class="name">Next Generation Date:</td>
+                                            
+                                            <td valign="top" class="value">
+                                                <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd MMM yyyy"/>
+                                            </td>
+                                        </tr>
 				
 										<tr class="prop">
Index: /trunk/grails-app/views/taskRecurringSchedule/create.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringSchedule/create.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringSchedule/create.gsp	(revision 137)
@@ -47,4 +47,22 @@
                             <tr class="prop">
                                 <td valign="top" class="name">
+                                    <label for="generateAhead">Generate Ahead:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}">
+                                    <input type="text" id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="generateAheadPeriod">Generate Ahead Period:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAheadPeriod','errors')}">
+                                    <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
                                     <label for="isEnabled">Is Enabled:</label>
                                 </td>
@@ -65,8 +83,8 @@
                             <tr class="prop">
                                 <td valign="top" class="name">
-                                    <label for="period">Period:</label>
+                                    <label for="nextGenerationDate">Next Generation Date:</label>
                                 </td>
-                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'period','errors')}">
-                                    <g:select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextGenerationDate','errors')}">
+                                    <g:datePicker name="nextGenerationDate" value="${taskRecurringScheduleInstance?.nextGenerationDate}" ></g:datePicker>
                                 </td>
                             </tr> 
@@ -78,4 +96,13 @@
                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}">
                                     <input type="text" id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" />
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recurPeriod">Recur Period:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurPeriod','errors')}">
+                                    <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select>
                                 </td>
                             </tr> 
Index: /trunk/grails-app/views/taskRecurringSchedule/edit.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringSchedule/edit.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringSchedule/edit.gsp	(revision 137)
@@ -50,4 +50,22 @@
                             <tr class="prop">
                                 <td valign="top" class="name">
+                                    <label for="generateAhead">Generate Ahead:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}">
+                                    <input type="text" id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="generateAheadPeriod">Generate Ahead Period:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAheadPeriod','errors')}">
+                                    <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
                                     <label for="isEnabled">Is Enabled:</label>
                                 </td>
@@ -68,8 +86,8 @@
                             <tr class="prop">
                                 <td valign="top" class="name">
-                                    <label for="period">Period:</label>
+                                    <label for="nextGenerationDate">Next Generation Date:</label>
                                 </td>
-                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'period','errors')}">
-                                    <g:select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'nextGenerationDate','errors')}">
+                                    <g:datePicker name="nextGenerationDate" value="${taskRecurringScheduleInstance?.nextGenerationDate}" ></g:datePicker>
                                 </td>
                             </tr> 
@@ -81,4 +99,13 @@
                                 <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}">
                                     <input type="text" id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" />
+                                </td>
+                            </tr> 
+                        
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recurPeriod">Recur Period:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurPeriod','errors')}">
+                                    <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select>
                                 </td>
                             </tr> 
Index: /trunk/grails-app/views/taskRecurringSchedule/list.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringSchedule/list.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringSchedule/list.gsp	(revision 137)
@@ -28,10 +28,10 @@
                    	        <th>Last Generated Sub Task</th>
                    	    
+                   	        <g:sortableColumn property="generateAhead" title="Generate Ahead" />
+                        
+                   	        <th>Generate Ahead Period</th>
+                   	    
                    	        <g:sortableColumn property="isEnabled" title="Is Enabled" />
                         
-                   	        <g:sortableColumn property="nextDueDate" title="Next Due Date" />
-                        
-                   	        <th>Period</th>
-                   	    
                         </tr>
                     </thead>
@@ -46,9 +46,9 @@
                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'lastGeneratedSubTask')}</td>
                         
+                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}</td>
+                        
+                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAheadPeriod')}</td>
+                        
                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td>
-                        
-                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'nextDueDate')}</td>
-                        
-                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'period')}</td>
                         
                         </tr>
Index: /trunk/grails-app/views/taskRecurringSchedule/show.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringSchedule/show.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringSchedule/show.gsp	(revision 137)
@@ -45,4 +45,18 @@
                     
                         <tr class="prop">
+                            <td valign="top" class="name">Generate Ahead:</td>
+                            
+                            <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'generateAhead')}</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Generate Ahead Period:</td>
+                            
+                            <td valign="top" class="value"><g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}">${taskRecurringScheduleInstance?.generateAheadPeriod?.encodeAsHTML()}</g:link></td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
                             <td valign="top" class="name">Is Enabled:</td>
                             
@@ -59,7 +73,7 @@
                     
                         <tr class="prop">
-                            <td valign="top" class="name">Period:</td>
+                            <td valign="top" class="name">Next Generation Date:</td>
                             
-                            <td valign="top" class="value"><g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.period?.id}">${taskRecurringScheduleInstance?.period?.encodeAsHTML()}</g:link></td>
+                            <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'nextGenerationDate')}</td>
                             
                         </tr>
@@ -69,4 +83,11 @@
                             
                             <td valign="top" class="value">${fieldValue(bean:taskRecurringScheduleInstance, field:'recurEvery')}</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Recur Period:</td>
+                            
+                            <td valign="top" class="value"><g:link controller="period" action="show" id="${taskRecurringScheduleInstance?.recurPeriod?.id}">${taskRecurringScheduleInstance?.recurPeriod?.encodeAsHTML()}</g:link></td>
                             
                         </tr>
Index: /trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringScheduleDetailed/create.gsp	(revision 137)
@@ -53,5 +53,27 @@
                                     <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}"
  										id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" />
-                                    <g:select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>
+                                    <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select>
+                                </td>
+                            </tr>   
+                      
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recurEvery">Task Duration:</label>
+                                </td>
+                                <td valign="top" class="value" >
+                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'taskDuration','errors')}"
+                                        id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" />
+                                    <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select>
+                                </td>
+                            </tr>   
+                      
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recurEvery">Generate Ahead:</label>
+                                </td>
+                                <td valign="top" class="value" >
+                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"
+                                        id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
+                                    <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
                                 </td>
                             </tr>
Index: /trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringScheduleDetailed/edit.gsp	(revision 137)
@@ -55,7 +55,29 @@
                                     <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'recurEvery','errors')}"
  										id="recurEvery" name="recurEvery" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'recurEvery')}" />
-                                    <g:select optionKey="id" from="${Period.list()}" name="period.id" value="${taskRecurringScheduleInstance?.period?.id}" ></g:select>
+                                    <g:select optionKey="id" from="${Period.list()}" name="recurPeriod.id" value="${taskRecurringScheduleInstance?.recurPeriod?.id}" ></g:select>
                                 </td>
-                            </tr> 
+                            </tr>   
+                      
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recurEvery">Task Duration:</label>
+                                </td>
+                                <td valign="top" class="value" >
+                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'taskDuration','errors')}"
+                                        id="taskDuration" name="taskDuration" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'taskDuration')}" />
+                                    <g:select optionKey="id" from="${Period.list()}" name="taskDurationPeriod.id" value="${taskRecurringScheduleInstance?.taskDurationPeriod?.id}" ></g:select>
+                                </td>
+                            </tr>       
+                      
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recurEvery">Generate Ahead:</label>
+                                </td>
+                                <td valign="top" class="value" >
+                                    <input type="text" class="time ${hasErrors(bean:taskRecurringScheduleInstance,field:'generateAhead','errors')}"
+                                        id="generateAhead" name="generateAhead" value="${fieldValue(bean:taskRecurringScheduleInstance,field:'generateAhead')}" />
+                                    <g:select optionKey="id" from="${Period.list()}" name="generateAheadPeriod.id" value="${taskRecurringScheduleInstance?.generateAheadPeriod?.id}" ></g:select>
+                                </td>
+                            </tr>
                         
                             <tr class="prop">
@@ -73,5 +95,5 @@
                 <div class="buttons">
                     <span class="button"><g:actionSubmit class="save" value="Update" /></span>
-                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
+<!--                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> -->
                 </div>
             </g:form>
Index: /trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringScheduleDetailed/list.gsp	(revision 137)
@@ -28,5 +28,5 @@
                    	        <g:sortableColumn property="recurEvery" title="Recur Every" />
                    	        
-                   	        <g:sortableColumn property="period" title="Period" />
+                   	        <g:sortableColumn property="recurPeriod" title="Recur Period" />
                    	        
                    	        <g:sortableColumn property="isEnabled" title="Is Enabled" />
@@ -47,5 +47,5 @@
                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'recurEvery')}</td>
                         
-                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'period')}</td>
+                            <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'recurPeriod')}</td>
                         
                             <td>${fieldValue(bean:taskRecurringScheduleInstance, field:'isEnabled')}</td>
Index: /trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp
===================================================================
--- /trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp	(revision 136)
+++ /trunk/grails-app/views/taskRecurringScheduleDetailed/show.gsp	(revision 137)
@@ -39,8 +39,16 @@
                     
                         <tr class="prop">
+                            <td valign="top" class="name">Start Date:</td>
+                            
+                            <td valign="top" class="value">
+                                <g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd MMM yyyy"/>
+                            </td>
+                        </tr>
+                    
+                        <tr class="prop">
                             <td valign="top" class="name">Recur Every:</td>
                             
                             <td valign="top" class="value">
-								${taskRecurringScheduleInstance?.recurEvery} ${taskRecurringScheduleInstance?.period}
+								${taskRecurringScheduleInstance?.recurEvery} ${taskRecurringScheduleInstance?.recurPeriod}
 							</td>
                             
@@ -48,9 +56,18 @@
                     
                         <tr class="prop">
-                            <td valign="top" class="name">Start Date:</td>
+                            <td valign="top" class="name">Task Duration:</td>
                             
-							<td valign="top" class="value">
-								<g:formatDate date="${taskRecurringScheduleInstance.startDate}" format="EEE, dd MMM yyyy"/>
-							</td>
+                            <td valign="top" class="value">
+                                ${taskRecurringScheduleInstance?.taskDuration} ${taskRecurringScheduleInstance?.taskDurationPeriod}
+                            </td>
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Generate Ahead:</td>
+                            
+                            <td valign="top" class="value">
+                                ${taskRecurringScheduleInstance?.generateAhead} ${taskRecurringScheduleInstance?.generateAheadPeriod}
+                            </td>
+                            
                         </tr>
                     
@@ -61,20 +78,33 @@
                             
                         </tr>
+                    </tbody>
+                </table>
+                
+                <table>
+                    <tbody>
+                        <tr class="prop">
+                            <td valign="top" class="name">Next Target Start Date:</td>
+                            
+                            <td valign="top" class="value">
+								<g:formatDate date="${taskRecurringScheduleInstance.nextTargetStartDate}" format="EEE, dd MMM yyyy"/>
+							</td>
+                            
+                        </tr>
+                    
+                        <tr class="prop">
+                            <td valign="top" class="name">Next Target Completion Date:</td>
+                            
+                            <td valign="top" class="value">
+                                <g:formatDate date="${taskRecurringScheduleInstance.nextTargetCompletionDate}" format="EEE, dd MMM yyyy"/>
+                            </td>
+                            
+                        </tr>
                         
                         <tr class="prop">
-                    		<td></td>
-						</tr>
-                        
-                        <tr class="prop">
-                    		<td></td>
-						</tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Next Due Date:</td>
+                            <td valign="top" class="name">Next Generation Date:</td>
                             
                             <td valign="top" class="value">
-								<g:formatDate date="${taskRecurringScheduleInstance.nextDueDate}" format="EEE, dd MMM yyyy"/>
-							</td>
-                            
+                                <g:formatDate date="${taskRecurringScheduleInstance.nextGenerationDate}" format="EEE, dd MMM yyyy"/>
+                            </td>
                         </tr>
 						
@@ -105,5 +135,5 @@
                     <input type="hidden" name="id" value="${taskRecurringScheduleInstance?.id}" />
                     <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
-                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
+<!--                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> -->
                 </g:form>
             </div>
Index: /trunk/test/unit/DateUtilServiceTests.groovy
===================================================================
--- /trunk/test/unit/DateUtilServiceTests.groovy	(revision 137)
+++ /trunk/test/unit/DateUtilServiceTests.groovy	(revision 137)
@@ -0,0 +1,15 @@
+import grails.test.*
+
+class DateUtilServiceTests extends GrailsUnitTestCase {
+    protected void setUp() {
+        super.setUp()
+    }
+
+    protected void tearDown() {
+        super.tearDown()
+    }
+
+    void testSomething() {
+
+    }
+}
Index: /trunk/web-app/WEB-INF/sitemesh.xml
===================================================================
--- /trunk/web-app/WEB-INF/sitemesh.xml	(revision 136)
+++ /trunk/web-app/WEB-INF/sitemesh.xml	(revision 137)
@@ -2,9 +2,9 @@
     <page-parsers>
         <parser content-type="text/html"
-            class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
+            class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />
         <parser content-type="text/html;charset=ISO-8859-1"
-            class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
+            class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />
         <parser content-type="text/html;charset=UTF-8"
-            class="com.opensymphony.module.sitemesh.parser.FastPageParser" />            
+            class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />            
     </page-parsers>
 
Index: /trunk/web-app/WEB-INF/tld/grails.tld
===================================================================
--- /trunk/web-app/WEB-INF/tld/grails.tld	(revision 136)
+++ /trunk/web-app/WEB-INF/tld/grails.tld	(revision 137)
@@ -10,412 +10,4 @@
     <uri>http://grails.codehaus.org/tags</uri>
 
-    <tag>
-        <description>
-        	Includes a javascript src file, library or inline script
-	 	if the tag has no src or library attributes its assumed to be an inline script
-        </description>
-        <name>javascript</name>
-        <tag-class>org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-            <description>A predefined JavaScript or AJAX library to load</description>
-            <name>library</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <description>A custom (or unknown to Grails) JavaScript source file</description>
-            <name>src</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <description>Since 0.6 Specifies the full base url to prepend to the library name</description>
-            <name>base</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-    
-    <!--  
-    <tag>
-    	<description>
-    	</description>
-    	<name></name>
-    	<tag-class></tag-class>
-    	<body-content></body-content>
-    	<attribute>
-    		<description></description>
-    		<name></name>
-    		<required></required>
-    		<rtexprvalue></rtexprvalue>
-    	</attribute>
-    </tag>
-    -->
-    <tag>
-    	<description>Escapes a javasacript string replacing single/double quotes and new lines
-    	</description>
-    	<name>escapeJavascript</name>
-    	<tag-class>org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib</tag-class>
-    	<body-content>JSP</body-content>
-    </tag>
-    
-    <tag>
-    	<description>Creates a form submit button that submits the current form to a remote ajax call
-    	</description>
-    	<name>submitToRemote</name>
-    	<tag-class>org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib</tag-class>
-    	<body-content>JSP</body-content>
-    	<attribute>
-            <name>name</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>value</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>id</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>class</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-    </tag>
-    
-    <tag>
-    	<description>A field that sends its value to a remote link
-    	</description>
-    	<name>remoteField</name>
-    	<tag-class>org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib</tag-class>
-    	<body-content>JSP</body-content>
-    	<attribute>
-            <name>name</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>value</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>paramName</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-    	<attribute>
-            <name>before</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>after</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>action</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>controller</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>id</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>params</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>asynchronous</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>method</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>update</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>onSuccess</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>onFailure</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>onComplete</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>onLoading</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>onLoaded</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>onUninitialized</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>on_ERROR_CODE</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>true</dynamic-attributes>
-    </tag>
-    <tag>
-        <description>
-        	Enables the storing of a value into the given ${var}
-        </description>
-        <name>set</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovySetTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-            <description>The value to store</description>
-            <name>value</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <description>The name of the variable to store the value in</description>
-            <name>var</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>
-        	Enables the storing of a value into the given ${var} into the page context
-        </description>
-        <name>def</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyDefTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-            <description>The value to store</description>
-            <name>value</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <description>The name of the variable to store the value in</description>
-            <name>var</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>
-        	Logical if tag to test whether the given condition is true
-        </description>
-        <name>if</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyIfTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-            <description>The condition to test</description>
-            <name>test</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>
-        	Logical else tag as fallback if the if condition fails
-        </description>
-        <name>else</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyElseTag</tag-class>
-        <body-content>JSP</body-content>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>
-        	Logical elseif tag to test whether the given condition is true
-        </description>
-        <name>elseif</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyElseIfTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-            <description>The condition to test</description>
-            <name>test</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-	<tag>
-        <description>
-        	Tag to loop over a collection while the test expression returns true
-        </description>
-        <name>while</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyWhileTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-            <description>The condition to test</description>
-            <name>test</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>Iterates over the given collection</description>
-        <name>each</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyEachTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-        	<description>The collection to iterate over</description>
-            <name>in</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>An optional var-name to reference onto the elements</description>
-            <name>var</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>status</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>true</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>Iterates over the given collection</description>
-        <name>findAll</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyFindAllTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-        	<description>The collection to iterate over</description>
-            <name>in</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>An optional var-name to reference onto the elements</description>
-            <name>var</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>The expression to filter the elements to iterate over</description>
-            <name>expr</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>status</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>true</dynamic-attributes>
-    </tag>
-
-	<tag>
-        <description>Iterates over the given collection and collects the elements
-        	you want to work with</description>
-        <name>collect</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyCollectTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-        	<description>The collection to iterate over</description>
-            <name>in</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>An optional var-name to reference onto the elements</description>
-            <name>var</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>The expression to use to collect the elements. The
-        	expression must retur true to add the element to the
-        	collection</description>
-            <name>expr</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>status</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
-    <tag>
-        <description>Iterates over the given collection and filters the elements
-        with a regular expression</description>
-        <name>grep</name>
-        <tag-class>org.codehaus.groovy.grails.web.taglib.GroovyGrepTag</tag-class>
-        <body-content>JSP</body-content>
-        <attribute>
-        	<description>The collection to iterate over</description>
-            <name>in</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>An optional var-name to reference onto the elements</description>
-            <name>var</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-        	<description>The regular expression to filter the element with. The
-        	filter is a simple Groovy Regex</description>
-            <name>filter</name>
-            <required>true</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <attribute>
-            <name>status</name>
-            <required>false</required>
-            <rtexprvalue>true</rtexprvalue>
-        </attribute>
-        <dynamic-attributes>false</dynamic-attributes>
-    </tag>
-
 
     <tag>
