public PivotalTask CreateNewStoryTask(int projectId, int storyId, string description, bool complete = false, int?position = null) { var pivotalTask = new PivotalNewTask { Description = description, Complete = complete, Position = position }; var response = HttpService.PostAsync(StringUtil.PivotalStoryTasksUrl(projectId, storyId), pivotalTask).Result; return(HandleResponse <PivotalTask>(response)); }
public void TestCreateStoryTask() { var newStoryTask = new PivotalNewTask { Complete = false, Description = "My Task 2" }; var createdTask = pt.CreateNewStoryTask(_testProjectId, 143518577, newStoryTask); Assert.IsNotNull(createdTask); }
/// <summary> /// Creates a new tasks on a project story. /// </summary> /// <param name="projectId">Id of the project.</param> /// <param name="storyId">Id of the story.</param> /// <param name="pivotalTask">The predefined PivotalNewTask to create.</param> /// <returns></returns> public PivotalTask CreateNewStoryTask(int projectId, int storyId, PivotalNewTask pivotalTask) { var response = HttpService.PostAsync(StringUtil.PivotalStoryTasksUrl(projectId, storyId), pivotalTask).Result; return(HandleResponse <PivotalTask>(response)); }