-
Hi, I would like to Move an existing item to another project. I assume I should use the method "MoveAsync". Its argument is an ItemMoveArgument, but the ProjectId of this argument is ReadOnly. There is the class SectionMoveArgument also, where the New method allow to create it with Ids, but it can not be the argument of MoveAsync. How can I move an item from one Project to another one ? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @matz33 You should use // Create two projects
var firstProjectId = await client.Projects.AddAsync(new Project("First"));
var secondProjectId = await client.Projects.AddAsync(new Project("Second"));
// Create an item in the first project
var itemId = await client.Items.AddAsync(new Item("Test task", firstProjectId));
// Move the item to the second project
await client.Items.MoveAsync(ItemMoveArgument.CreateMoveToProject(itemId, secondProjectId)); Also, the |
Beta Was this translation helpful? Give feedback.
Hi @matz33
You should use
ItemMoveArgument.CreateMoveToProject
to create theItemMoveArgument
instance.Also, the
ItemMoveArgument
has other static methods for other cases.