- Timestamp:
- Mar 3, 2011, 11:17:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/EntryDetailedController.groovy
r833 r838 67 67 } 68 68 69 /// @todo: Refactor to taskService and include moving task to "In Progress" when Entry.duration is updated. 69 70 def update = { 70 71 def entryInstance = Entry.get( params.id ) … … 74 75 entryInstance.properties = params 75 76 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) { 77 // If PM Entry update task.highestSeverity 78 if(entryInstance.entryType.id == 6) { 79 def clist = [] 80 entryInstance.task.entries.each { entry -> 81 if(entry.entryType.id == 6) 82 clist << entry.highestSeverity 83 } 84 85 if(clist) 86 entryInstance.task.highestSeverity = clist.sort{p1,p2 -> p2.id <=> p1.id}[0] 87 } 76 88 flash.message = "Entry ${params.id} updated" 77 89 redirect(action:show,id:entryInstance.id)
Note: See TracChangeset
for help on using the changeset viewer.