Exemplo n.º 1
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;
 }
Exemplo n.º 2
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;
        }