Index: trunk/grails-app/i18n/messages.properties
===================================================================
--- trunk/grails-app/i18n/messages.properties	(revision 242)
+++ trunk/grails-app/i18n/messages.properties	(revision 243)
@@ -47,4 +47,6 @@
 task.failedToSave=Could not complete operation, task failed to save.
 task.modifications.failedToSave=Could not complete operation, as task modification record failed to save.
+task.assignedGroups.failedToSave=Could not complete operation, as assignedGroup record failed to save.
+task.assignedPersons.failedToSave=Could not complete operation, as assignedPerson record failed to save.
 tast.taskRecurringSchedule.alreadyExists=This task already has a recurring schedule.
 
Index: trunk/grails-app/services/TaskRecurringScheduleService.groovy
===================================================================
--- trunk/grails-app/services/TaskRecurringScheduleService.groovy	(revision 242)
+++ trunk/grails-app/services/TaskRecurringScheduleService.groovy	(revision 243)
@@ -17,7 +17,12 @@
             if ( dateUtilService.tomorrow > it.nextGenerationDate) {
                     def p = [:]
+
+                    // Build the required params.
                     p.targetStartDate = it.nextTargetStartDate
                     p.targetCompletionDate = it.nextTargetCompletionDate
                     if(it.task.taskProcedure) p.taskProcedure = it.task.taskProcedure
+                    if(it.task.assignedGroups) p.assignedGroups = new ArrayList(it.task.assignedGroups)
+                    if(it.task.assignedPersons) p.assignedPersons = new ArrayList(it.task.assignedPersons)
+
                     def result = taskService.createSubTask(it.task, p)
                     if( !result.error ) {
Index: trunk/grails-app/services/TaskService.groovy
===================================================================
--- trunk/grails-app/services/TaskService.groovy	(revision 242)
+++ trunk/grails-app/services/TaskService.groovy	(revision 243)
@@ -57,5 +57,41 @@
                 }
 
-                // If we get here all went well.
+                //Add the assignedGroups, provided by a new ArrayList(task.assignedGroups)
+                if(params.assignedGroups) {
+                    def assignedGroupInstance
+                    params.assignedGroups.each() {
+                        assignedGroupInstance = new AssignedGroup(personGroup: it.personGroup,
+                                                                                                        task: taskInstance,
+                                                                                                        estimatedHour: it.estimatedHour,
+                                                                                                        estimatedMinute: it.estimatedMinute)
+
+                        if(!assignedGroupInstance.save()) {
+                            status.setRollbackOnly()
+                            taskInstance.errors.rejectValue("assignedGroups", "task.assignedGroups.failedToSave")
+                            result.error = true
+                            return result
+                        }
+                    }
+                }
+
+                //Add the assignedPersons, provided by a new ArrayList(task.assignedPersons)
+                if(params.assignedPersons) {
+                    def assignedPersonInstance
+                    params.assignedPersons.each() {
+                        assignedPersonInstance = new AssignedPerson(person: it.person,
+                                                                                                            task: taskInstance,
+                                                                                                            estimatedHour: it.estimatedHour,
+                                                                                                            estimatedMinute: it.estimatedMinute)
+
+                        if(!assignedPersonInstance.save()) {
+                            status.setRollbackOnly()
+                            taskInstance.errors.rejectValue("assignedPersons", "task.assignedPersons.failedToSave")
+                            result.error = true
+                            return result
+                        }
+                    }
+                }
+
+                // Success.
                 return result
             }
@@ -71,4 +107,5 @@
     * Creates a subTask copying attributes from the parentTask unless otherwise specified.
     * The taskProcedure is only assigned to the sub task if given in params.
+    * The assignedPersons and assignedGroups are only added to the sub task if given as new ArrayList's in params.
     * @param parentTask The parent task to get attributes from, also set as the parent.
     * @param params Overrides the parent task values if specified.
@@ -96,13 +133,6 @@
 
         if(params.taskProcedure) p.taskProcedure = params.taskProcedure
-
-                    //Set the assignedPersons
-//                     taskInstance.assignedPersons.each() {
-// 
-//                     def assignedPerson = new AssignedPerson(person: it.person,
-//                                                                                             task: subTaskInstance,
-//                                                                                             estimatedHour: it.estimatedHour,
-//                                                                                             estimatedMinute: it.estimatedMinute).save()
-//                     }
+        if(params.assignedGroups) p.assignedGroups = params.assignedGroups
+        if(params.assignedPersons) p.assignedPersons = params.assignedPersons
 
         result = create(p)
