PivotalTrackerAPI/Domain/Model/PivotalTask.cs
/// <summary>
/// Adds a task to the story
/// </summary>
/// <param name="user">The user to get the ApiToken from</param>
/// <param name="projectId">The project id</param>
/// <param name="storyId">The story id</param>
/// <param name="task">The task to add</param>
/// <returns>The created task</returns>
Adds a task to the story
Adds a task to the story
public static PivotalTask AddTask(PivotalUser user, int projectId, int storyId, PivotalTask task)
    {
      string url = String.Format("{0}/projects/{1}/stories/{2}/tasks?token={3}", PivotalService.BaseUrl, projectId, storyId, user.ApiToken);
      XmlDocument xml = SerializationHelper.SerializeToXmlDocument<PivotalTask>(task);
      string taskXml = PivotalService.CleanXmlForSubmission(xml, "//story", ExcludeNodesOnSubmit, true);
      XmlDocument response = PivotalService.SubmitData(url, taskXml, ServiceMethod.POST);
      return SerializationHelper.DeserializeFromXmlDocument<PivotalTask>(response);
    }
public static PivotalTask AddTask ( PivotalUser user , int projectId , int storyId , PivotalTask task ) { string url = String . Format ( " " , PivotalService . BaseUrl , projectId , storyId , user . ApiToken ) ; XmlDocument xml = SerializationHelper . SerializeToXmlDocument < PivotalTask > ( task ) ; string taskXml = PivotalService . CleanXmlForSubmission ( xml , " " , ExcludeNodesOnSubmit , true ) ; XmlDocument response = PivotalService . SubmitData ( url , taskXml , ServiceMethod . POST ) ; return SerializationHelper . DeserializeFromXmlDocument < PivotalTask > ( response ) ; }
Adds a task to the story
Adds a task to the story
The created task
The created task
user
PivotalUser
The user to get the ApiToken from
The user to get the ApiToken from
projectId
int
The project id
The project id
storyId
int
The story id
The story id
task
PivotalTask
The task to add
The task to add