Index: trunk/grails-app/views/taskDetailed/create.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/create.gsp	(revision 482)
+++ trunk/grails-app/views/taskDetailed/create.gsp	(revision 487)
@@ -69,5 +69,9 @@
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'leadPerson','errors')}">
-                                    <g:select optionKey="id" from="${Person.list()}" name="leadPerson.id" value="${taskInstance?.leadPerson?.id}" ></g:select>
+                                    <g:select optionKey="id"
+                                                        from="${Person.findAllByIsActive(true).sort { p1, p2 -> p1.firstName.compareToIgnoreCase(p2.firstName) }}"
+                                                        name="leadPerson.id"
+                                                        value="${taskInstance?.leadPerson?.id}" >
+                                    </g:select>
                                     <g:helpBalloon code="task.leadPerson" />
                                 </td>
@@ -79,5 +83,10 @@
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}">
-                                    <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select>
+                                    <g:select optionKey="id"
+                                                        from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
+                                                        name="primaryAsset.id"
+                                                        value="${taskInstance?.primaryAsset?.id}"
+                                                        noSelection="['null':'--None--']" >
+                                    </g:select>
                                     <g:helpBalloon code="task.primaryAsset" />
                                 </td>
@@ -90,7 +99,8 @@
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}">
                                     <g:select id="associatedAssets" name="associatedAssets"
-                                                    from="${Asset.list()}"
+                                                    from="${Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
                                                     size="5" multiple="yes" optionKey="id"
-                                                    value="${taskInstance?.associatedAssets?.id}"  noSelection="['':'--None--']"/>
+                                                    value="${taskInstance?.associatedAssets?.id}"  noSelection="['':'--None--']" >
+                                    </g:select>
                                     <g:helpBalloon code="task.associatedAssets" />
                                 </td>
@@ -102,5 +112,9 @@
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskPriority','errors')}">
-                                    <g:select optionKey="id" from="${scheduledTaskPriorities}" name="taskPriority.id" value="${taskInstance?.taskPriority?.id}" ></g:select>
+                                    <g:select optionKey="id"
+                                                        from="${scheduledTaskPriorities}"
+                                                        name="taskPriority.id"
+                                                        value="${taskInstance?.taskPriority?.id}" >
+                                    </g:select>
                                 </td>
                             </tr>
@@ -114,13 +128,4 @@
                                 </td>
                             </tr>
-
-<!--                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="parentTask">Parent Task:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'parentTask','errors')}">
-                                    <g:select optionKey="id" from="${Task.findAllByTrash(false)}" name="parentTask.id" value="${taskInstance?.parentTask?.id}" noSelection="['null':'--None--']"></g:select>
-                                </td>
-                            </tr> -->
                         
                             <tr class="prop">
@@ -129,5 +134,9 @@
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskGroup','errors')}">
-                                    <g:select optionKey="id" from="${TaskGroup.list()}" name="taskGroup.id" value="${taskInstance?.taskGroup?.id}" ></g:select>
+                                    <g:select optionKey="id"
+                                                        from="${TaskGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
+                                                        name="taskGroup.id"
+                                                        value="${taskInstance?.taskGroup?.id}" >
+                                    </g:select>
                                 </td>
                             </tr> 
@@ -138,5 +147,9 @@
                                 </td>
                                 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'taskType','errors')}">
-                                    <g:select optionKey="id" from="${scheduledTaskTypes}" name="taskType.id" value="${taskInstance?.taskType?.id}" ></g:select>
+                                    <g:select optionKey="id"
+                                                        from="${scheduledTaskTypes}"
+                                                        name="taskType.id"
+                                                        value="${taskInstance?.taskType?.id}" >
+                                    </g:select>
                                 </td>
                             </tr> 
