コード例 #1
0
        public string CreateIssue(Issue issue)
        {
            using(IJiraSoapService service = new JiraSoapService()) {
                var token = service.login(UserName, Password);
                var types = service.getIssueTypes(token);
                var remoteIssue = CreateRemoteIssue(issue);

                remoteIssue.project = "MP";
                remoteIssue.type = types[0].id;
                remoteIssue.assignee = "remote";

                var createdIssue = service.createIssue(token, remoteIssue);

                service.logout(token);

                return createdIssue.key;
            }
        }
コード例 #2
0
        /// <summary>
        /// Get all issues in JIRA that match the filter that says that a defect should be created in V1.
        /// </summary>
        /// <returns>Isses that need to have defects created for them.</returns>
        public List<Defect> GetIssues()
        {
            using(IJiraSoapService service = new JiraSoapService()) {
                var token = service.login(UserName, Password);
                var remoteIssues = service.getIssuesFromFilter(token, "10000");
                var defects = new List<Defect>();

                foreach(var issue in remoteIssues) {
                    defects.Add(new Defect(issue.summary, issue.description, issue.project, issue.assignee, issue.priority, issue.environment));
                }

                service.logout(token);

                return defects;
            }
        }