Changeset 809 for trunk/grails-app/services/TaskService.groovy
- Timestamp:
- Feb 16, 2011, 8:10:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskService.groovy
r802 r809 188 188 * Creates a subTask copying sane attributes from the parentTask unless otherwise specified in params. 189 189 * The targetStartDate and targetCompletionDate default to today since that is the sane thing to do. 190 * The taskProcedure is only assigned to the sub task if supplied in params.190 * The taskProcedureRevision is only assigned to the sub task if supplied in params. 191 191 * The assignedPersons and assignedGroups are only added to the sub task if supplied in params. 192 192 * The positiveFault property is never set on the subTask. … … 228 228 229 229 // Supplied by recurring tasks. 230 if(params.taskProcedure ) p.taskProcedure = params.taskProcedure230 if(params.taskProcedureRevision) p.taskProcedureRevision = params.taskProcedureRevision 231 231 if(params.assignedGroups) p.assignedGroups = params.assignedGroups // Collection. 232 232 if(params.assignedPersons) p.assignedPersons = params.assignedPersons // Collection. … … 691 691 } 692 692 693 // Check for taskProcedure using this task as linkedTask. 694 if(result.taskInstance.taskProcedure?.linkedTask?.id == result.taskInstance.id) 695 return fail(field:"taskProcedure", code:"task.operationNotPermittedOnTaskLinkedToProcedure") 693 // Check for taskProcedureRevision using this task as linkedTask. 694 if(result.taskInstance.taskProcedureRevision?.linkedTask?.id == result.taskInstance.id) { 695 if(!authenticateService.ifAnyGranted('ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager')) 696 return fail(field:"taskProcedureRevision", code:"task.operationNotPermittedOnTaskLinkedToProcedureWithoutAuth") 697 } 696 698 697 699 // Check for Parent PM task type. 698 700 if(result.taskInstance.taskType.id == 6) 699 return fail(field:"task Procedure", code:"task.operationNotPermittedOnParentPmTask")701 return fail(field:"taskType", code:"task.operationNotPermittedOnParentPmTask") 700 702 701 703 result.taskInstance.trash = true
Note: See TracChangeset
for help on using the changeset viewer.