Changeset 812


Ignore:
Timestamp:
02/21/11 17:41:37 (8 years ago)
Author:
gav
Message:

Sort MaintenanceActions at create and update time.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/TaskProcedureDetailedController.groovy

    r809 r812  
    177177    } 
    178178 
     179    def listMaintenanceActions = { 
     180        def l = [] 
     181        MaintenanceAction.list().each { 
     182            println "$it.id - $it.procedureStepNumber, $it.description, $it.pageRef" 
     183        } 
     184        render "Done" 
     185    } 
     186 
    179187} 
  • trunk/grails-app/services/TaskProcedureService.groovy

    r809 r812  
    7777                return fail(code:"default.update.failure") 
    7878            } 
     79 
     80            // Sort MaintenanceActions. 
     81            result.taskProcedureInstance.maintenanceActions.sort { p1, p2 -> p1.procedureStepNumber <=> p2.procedureStepNumber } 
    7982 
    8083            def r = createRevision(result.taskProcedureInstance) 
     
    149152            } 
    150153 
     154            // Sort MaintenanceActions. 
     155            result.taskProcedureInstance.maintenanceActions.sort { p1, p2 -> p1.procedureStepNumber <=> p2.procedureStepNumber } 
     156 
    151157            def r = createRevision(result.taskProcedureInstance) 
    152158            if(r.error) 
Note: See TracChangeset for help on using the changeset viewer.