示例#1
0
 public string ToXml()
 {
     return(new XElement("story",
                         new XElement("project_id", ProjectId),
                         new XElement("name", Name),
                         new XElement("story_type", StoryType.ToString().ToLower()),
                         new XElement("description", Description),
                         //new XElement("estimate", Estimate),
                         new XElement("requested_by", RequestedBy))
            .ToString(SaveOptions.DisableFormatting));
 }
        /// <summary>
        /// Creates a new story in a project.
        /// </summary>
        /// <param name="projectId">Id of the project to create a story in.</param>
        /// <param name="name">The name you wish to give to the story.</param>
        /// <param name="storyType">Type of the story, eg feature, bug.</param>
        /// <param name="labels">Any labels you wish to give to the story.</param>
        /// <param name="description">(optional) Description of the story. Use this for additional info.</param>
        /// <returns>Returns a completed PivotalStory</returns>
        public async Task <PivotalStory> CreateNewStoryAsync(int?projectId, string name, StoryType storyType, List <string> labels = null, string description = null)
        {
            int properProjectId = GetProjectIdToUse(projectId);
            var story           = new PivotalStory
            {
                Name        = name,
                Description = description,
                StoryType   = storyType.ToString()
            };
            var response = await HttpService.PostAsync(StringUtil.PivotalStoriesUrl(properProjectId), story);

            return(HandleResponse <PivotalStory>(response));
        }
示例#3
0
        /// <summary>
        /// Creates a new story in a project.
        /// </summary>
        /// <param name="projectId">Id of the project to create a story in.</param>
        /// <param name="name">The name you wish to give to the story.</param>
        /// <param name="storyType">Type of the story, eg feature, bug.</param>
        /// <param name="labels">Any labels you wish to give to the story.</param>
        /// <param name="description">(optional) Description of the story. Use this for additional info.</param>
        /// <returns>Returns a completed PivotalStory</returns>
        public PivotalStory CreateNewStory(int projectId, string name, StoryType storyType, List <string> labels = null, string description = null)
        {
            var story = new PivotalNewStory
            {
                Name        = name,
                Description = description,
                Labels      = labels ?? new List <string>(),
                StoryType   = storyType.ToString()
            };
            var response = HttpService.PostAsync(StringUtil.PivotalStoriesUrl(projectId), story).Result;

            return(HandleResponse <PivotalStory>(response));
        }
 public FilteringCriteria Type(StoryType type)
 {
     this.AddFilter(string.Format("type:{0}", type.ToString().ToLower()));
     return this;
 }
示例#5
0
 public FilteringCriteria Type(StoryType type)
 {
     this.AddFilter(string.Format("type:{0}", type.ToString().ToLower()));
     return(this);
 }
示例#6
0
 public void FillInteractionPanel()
 {
     // TODO write a handler that return the text for the subtitle
     string reference = m_Category.ToString();
     // categoryTitle.StringReference = reference;
 }