示例#1
0
 private static void CreateComponents(RemoteProject project, JiraSoapServiceService jiraSoapService, string token, RemoteIssue issue)
 {
     List<RemoteComponent> components =
         new List<RemoteComponent>(jiraSoapService.getComponents(token, project.key));
     foreach (RemoteComponent component in components)
     {
         if (component.name.Equals("MM - Strategies"))
         {
             issue.components = new RemoteComponent[] {component};
         }
     }
 }
示例#2
0
 /// <remarks/>
 public System.IAsyncResult BegincreateIssue(string in0, RemoteIssue in1, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("createIssue", new object[] {
                 in0,
                 in1}, callback, asyncState);
 }
示例#3
0
 public RemoteIssue createIssue(string in0, RemoteIssue in1)
 {
     object[] results = this.Invoke("createIssue", new object[] {
                 in0,
                 in1});
     return ((RemoteIssue)(results[0]));
 }
示例#4
0
 /// <remarks/>
 public System.IAsyncResult BegincreateIssueWithSecurityLevel(string in0, RemoteIssue in1, long in2, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("createIssueWithSecurityLevel", new object[] {
                 in0,
                 in1,
                 in2}, callback, asyncState);
 }
示例#5
0
 public RemoteIssue createIssueWithSecurityLevel(string in0, RemoteIssue in1, long in2)
 {
     object[] results = this.Invoke("createIssueWithSecurityLevel", new object[] {
                 in0,
                 in1,
                 in2});
     return ((RemoteIssue)(results[0]));
 }
示例#6
0
        private static RemoteIssue CreateIssue(RemoteProject project, JiraSoapServiceService jiraSoapService, string token)
        {
            System.Diagnostics.Debug.WriteLine("Creating a new issue on http://jira/jira ...");
            Console.WriteLine("Creating a new issue on http://jira/jira ...");

            RemoteIssue issue = new RemoteIssue();

            issue.project = project.key;

            RemoteVersion Iteration = new RemoteVersion();
            Iteration.id = ConfigurationManager.AppSettings["JiraIteration"];
            RemoteVersion[] arrayOfVersions = {Iteration};

            issue.affectsVersions = arrayOfVersions;

            List<RemoteIssueType> issueTypes =
                new List<RemoteIssueType>(jiraSoapService.getIssueTypesForProject(token, project.id));
            foreach (RemoteIssueType issueType in issueTypes)
            {
                if (issueType.name.Equals("Bug"))
                {
                    issue.type = issueType.id;
                }
            }
            return issue;
        }
示例#7
0
        private static void PushToJira(JiraSoapServiceService jiraSoapService, string token, RemoteIssue issue, RemoteComment comment)
        {
            RemoteIssue returnedIssue = jiraSoapService.createIssue(token, issue);
            jiraSoapService.addComment(token, returnedIssue.key, comment);

            System.Diagnostics.Debug.WriteLine("Successfully created issue http://pm.iqmetrix.com/browse/" + returnedIssue.key);
            Console.WriteLine("Successfully created issue http://pm.iqmetrix.com/browse/" + returnedIssue.key + Environment.NewLine);
        }
示例#8
0
 private static void InitIssue(RemoteIssue issue, JiraIssue jiraIssue, RemoteCustomFieldValue[] listOfCustomFields, RemoteUser user)
 {
     issue.reporter = user.name;
     issue.summary = jiraIssue.Summary;
     issue.description = jiraIssue.Description;
     issue.environment = jiraIssue.EnvironmentFoundIn;
     issue.customFieldValues = listOfCustomFields;
 }
示例#9
0
        private static RemoteCustomFieldValue[] InitCustomFields(RemoteIssue issue, JiraIssue jiraIssue)
        {
            string SprintIdFieldId = "customfield_10160";
            string SprintDateFieldId = "customfield_10563";
            string EnvironmentFieldId = "customfield_10062";
            string LabelId = "labels";

            string[] sprintIdNumber = { jiraIssue.SprintIssueId };
            string[] sprintDate = { jiraIssue.DateCreated };
            string[] environment = {jiraIssue.EnvironmentFoundIn};
            string[] labels = {ConfigurationManager.AppSettings["JiraIteration"]};

            RemoteCustomFieldValue sprintId = new RemoteCustomFieldValue();
            RemoteCustomFieldValue sprintIssueDate = new RemoteCustomFieldValue();
            RemoteCustomFieldValue environmentFoundIn = new RemoteCustomFieldValue();
            RemoteCustomFieldValue label = new RemoteCustomFieldValue();

            sprintId.customfieldId = SprintIdFieldId;
            sprintId.values = sprintIdNumber;

            sprintIssueDate.customfieldId = SprintDateFieldId;
            sprintIssueDate.values = sprintDate;

            environmentFoundIn.customfieldId = EnvironmentFieldId;
            environmentFoundIn.values = environment;

            label.customfieldId = LabelId;
            label.values = labels;

            RemoteCustomFieldValue[] listOfCustomFields = {sprintId, sprintIssueDate, environmentFoundIn};

            issue.customFieldValues = listOfCustomFields;
            return listOfCustomFields;
        }