Ignore:
Timestamp:
Feb 21, 2011, 8:50:33 PM (14 years ago)
Author:
gav
Message:

Add check to prevent changing a tasks primaryAsset if maintenanceActions have been created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/TaskService.groovy

    r809 r816  
    415415            result.taskInstance.properties = params
    416416
     417            if(result.taskInstance.taskProcedureRevision?.maintenanceActions && result.taskInstance.isDirty('primaryAsset'))
     418                return fail(field:'primaryAsset', code:"tast.operationNotPermittedToChangeAssetWithMaintenanceActions")
     419
    417420            if(result.taskInstance.hasErrors() || !result.taskInstance.save())
    418421                return fail(code:"default.update.failure")
Note: See TracChangeset for help on using the changeset viewer.