PivotalTrackerAPI/Domain/Model/PivotalTask.cs
/// <summary>
/// Deletes a task from a 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 delete</param>
/// <returns></returns>
Deletes a task from a story
Deletes a task from a story
public static PivotalTask DeleteTask(PivotalUser user, int projectId, int storyId, PivotalTask task)
    {
      string url = String.Format("{0}/projects/{1}/stories/{2}/task/{3}?token={4}", PivotalService.BaseUrl, projectId, storyId, task.TaskId.GetValueOrDefault().ToString(), user.ApiToken);
      XmlDocument xml = SerializationHelper.SerializeToXmlDocument<PivotalTask>(task);
      string taskXml = PivotalService.CleanXmlForSubmission(xml, "//task", ExcludeNodesOnSubmit, true);
      XmlDocument response = PivotalService.SubmitData(url, taskXml, ServiceMethod.DELETE);
      return task;
    }
public static PivotalTask DeleteTask ( PivotalUser user , int projectId , int storyId , PivotalTask task ) { string url = String . Format ( " " , PivotalService . BaseUrl , projectId , storyId , task . TaskId . GetValueOrDefault ( ) . ToString ( ) , user . ApiToken ) ; XmlDocument xml = SerializationHelper . SerializeToXmlDocument < PivotalTask > ( task ) ; string taskXml = PivotalService . CleanXmlForSubmission ( xml , " " , ExcludeNodesOnSubmit , true ) ; XmlDocument response = PivotalService . SubmitData ( url , taskXml , ServiceMethod . DELETE ) ; return task ; }
Deletes a task from a story
Deletes a task from a story
None
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 delete
The task to delete