Copies an array of task lists from a given source project to a target project.
null
. null
. ITaskList
array to copy. Each of the task lists must be from the source project and the user must have permission to copy each task list. Cannot be null
. //create the source project, and then persist it. IProject sourceProject = projectManager.CreateProject("Source Project Name", "Source Project Description"); sourceProject.Store(); //create the target project, and then persist it. IProject targetProject = projectManager.CreateProject("Target Project Name", "Target Project Description"); targetProject.Store(); //create a task list in the soucre project, and then persist it. ITaskList tasklist = tasklistManager.CreateTaskList(sourceProject, "Source Task List Name", "Source Task List Description"); tasklist.Store(); //create a task in the source task list, and then persist it. ITask task = tasklist.CreateTask("Task name", "Task description", new DateTime(2004, 9, 1), new DateTime(2004, 9, 8)); task.Store(); //copy the task lists from source project to target project //the copied task lists with containing tasks are already persisted by this method tasklistManager.CopyTaskLists(sourceProject, targetProject, new ITaskList { tasklist } );
Exception Type | Condition |
---|---|
CollaborationException | The method call resulted in an error, or the user does not have Read access to the given projects. |
ArgumentException | The ID of the sourceProject is not > 0, or the ID of the targetProject is not > 0, or the ID of any of the task lists is not > 0. |
MultipleObjectException | Errors occurred while copying. Each source exception can be retrieved from this exception. The exception should never happen unless source project content is being accessed concurrently with this copy operation. |
SoapException | There was a communication problem during the execution of the remote method call. |
ITaskListManager Interface | Plumtree.Remote.PRC.Collaboration.Tasklist Namespace