示例#1
0
        public List <Issue> GetComponentIssues(string component)
        {
            var getReleasesJiraRestApiUrl = Properties.Settings.Default.JiraRestApiUrl + "api/2/search?jql=component = \"" + component + "\"";
            var xmlJiraApiResponse        = JiraRestApiHelper.GetXmlJiraApiResponse(Properties.Settings.Default.JiraUsername, Properties.Settings.Default.JiraPassword, getReleasesJiraRestApiUrl);

            var issues = new List <Issue>();

            foreach (XmlNode xmlNode in xmlJiraApiResponse.GetElementsByTagName("issues"))
            {
                var issueXml = "<Issue>" + xmlNode.InnerXml + "</Issue>";
                var issue    = Issue.DeserializeFromXML(issueXml);
                issues.Add(issue);
            }

            return(issues);
        }
示例#2
0
        public List <Issue> GetSprintIssues(int sprintId)
        {
            var getSprintsJiraRestApiUrl = Properties.Settings.Default.JiraRestApiUrl + "agile/1.0/board/" + Properties.Settings.Default.JiraBoardId + "/sprint/" + sprintId + "/issue";
            var xmlJiraApiResponse       = JiraRestApiHelper.GetXmlJiraApiResponse(Properties.Settings.Default.JiraUsername, Properties.Settings.Default.JiraPassword, getSprintsJiraRestApiUrl);

            var issues = new List <Issue>();

            foreach (XmlNode xmlNode in xmlJiraApiResponse.GetElementsByTagName("issues"))
            {
                var issueXml = "<Issue>" + xmlNode.InnerXml + "</Issue>";
                var issue    = Issue.DeserializeFromXML(issueXml);
                issues.Add(issue);
            }

            return(issues);
        }