Adding an existing task into a new project

I am working on some code that will take “milestone” tasks from all but one of the projects in a portfolio. Once I have all the “milestone” tasks, I want to place them in the one remaining project. I thought about creating a new task with all of the same information as the original task, but I would change the “projects” field to the new project. But then I thought that the old version of the task would not be linked to the new version of the task. I want the tasks to be identical and linked together, but just have different locations in the portfolio. I’m not sure what endpoint to use for this code, but I’d appreciate some input.

I’m not sure I understand what you really need… but I suggest to add these tasks to the other project and keep the link with the original project too.
A task can be linked to more than 1 project.
Just use that endpoint.
Then, your task will be visible in the original project + in the new project, but it’s not a copy, it’s the same task.

1 Like