Index: trunk/grails-app/controllers/EntryDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/EntryDetailedController.groovy	(revision 833)
+++ trunk/grails-app/controllers/EntryDetailedController.groovy	(revision 838)
@@ -67,4 +67,5 @@
     }
 
+    /// @todo: Refactor to taskService and include moving task to "In Progress" when Entry.duration is updated.
     def update = {
         def entryInstance = Entry.get( params.id )
@@ -74,4 +75,15 @@
                 entryInstance.properties = params
                 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) {
+                    // If PM Entry update task.highestSeverity
+                    if(entryInstance.entryType.id == 6) {
+                        def clist = []
+                        entryInstance.task.entries.each { entry ->
+                            if(entry.entryType.id == 6)
+                                clist << entry.highestSeverity
+                        }
+
+                        if(clist)
+                            entryInstance.task.highestSeverity = clist.sort{p1,p2 -> p2.id <=> p1.id}[0]
+                    }
                     flash.message = "Entry ${params.id} updated"
                     redirect(action:show,id:entryInstance.id)
Index: trunk/grails-app/controllers/TaskDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/TaskDetailedController.groovy	(revision 833)
+++ trunk/grails-app/controllers/TaskDetailedController.groovy	(revision 838)
@@ -185,4 +185,6 @@
         associatedPropertyValues.taskGroupList = TaskGroup.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
         associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
+        def highestSeverityCodeQuery = 'select distinct cs.code from ConditionSeverity cs where cs.isActive = ? order by cs.code'
+        associatedPropertyValues.highestSeverityList = ConditionSeverity.executeQuery(highestSeverityCodeQuery, [true], [max:associatedPropertyMax])
         associatedPropertyValues.taskStatusList = TaskStatus.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
         associatedPropertyValues.taskTypeList = TaskType.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
@@ -342,4 +344,6 @@
         associatedPropertyValues.taskGroupList = TaskGroup.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
         associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
+        def highestSeverityCodeQuery = 'select distinct cs.code from ConditionSeverity cs where cs.isActive = ? order by cs.code'
+        associatedPropertyValues.highestSeverityList = ConditionSeverity.executeQuery(highestSeverityCodeQuery, [true], [max:associatedPropertyMax])
         associatedPropertyValues.taskStatusList = TaskStatus.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
         associatedPropertyValues.taskTypeList = TaskType.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
