LiquidPlanner Classic Forum
Update assignment of project
over 5 years ago by LiquidPlanner Support(edited)
Posted on behalf of a customer. Original posting date 2015-03-02.
I’m trying to update the owner of a project through the assignments and the documentation says I should use update_assignment, but I’m getting a 404 error when I do so. There’s something wrong with my code but I don’t see what it is.
// Create new project
Item aProject = liquidplanner.CreateProject(new Item()
{
name = “project name”,
description = “description”
};);
Item aAssign = liquidplanner.UpdateProjectAssignment(aProject,new Item()
{
person_id = XXXXXX // This is the person I want to be the new owner
};);
Here are the methods (copied from the sample code in your help section)
// Project Methods
public Item CreateProject(LpObject data)
{
return GetObject<Item>(post("/workspaces/" + this.WorkspaceId + "/projects", new
{
project = data
}));
}
public Item UpdateProjectAssignment(LpObject project, LpObject data)
{
return GetObject<Item>(put("/workspaces/" + this.WorkspaceId + "/projects/" + project.id + "/update_assignment", new
{
assignment = data
}));
}
Creation of the project works fine, but I get 404 when I try to do the update project assignment. Any ideas?