Ignore:
Timestamp:
Apr 29, 2010, 5:01:51 AM (9 years ago)
Author:
gav
Message:

Added integration test for TaskSearchService.getPersonsTasks().
Extended TaskService.delete() to handle assignedPersons and assignedGroups.
Use safe collection navigation in AssignedGroupService and AssignedPersonService?.

File:
1 edited

Legend:

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

    r510 r514  
    254254            }
    255255
     256            // Handle assignedPersons.
     257            def taskAssignedPersons = AssignedPerson.findAllByTask(result.taskInstance)
     258            taskAssignedPersons.each() {
     259                result.taskInstance.removeFromAssignedPersons(it)
     260                it.delete()
     261            }
     262
     263            // Handle assignedGroups.
     264            def taskAssignedGroups = AssignedGroup.findAllByTask(result.taskInstance)
     265            taskAssignedGroups.each() {
     266                result.taskInstance.removeFromAssignedGroups(it)
     267                it.delete()
     268            }
     269
    256270            if(result.error)
    257271                return result
Note: See TracChangeset for help on using the changeset viewer.