Ejemplo n.º 1
0
        private async void CloseSubTaskk(string subTaskKey)
        {
            IssueRef issueRef = new IssueRef();

            issueRef.key = subTaskKey;
            issueRef.id  = subTaskKey;

            var issue = await JiraProxy.LoadIssue(issueRef);

            if (issue == null || issue.fields == null)
            {
                return;
            }

            JiraProxy.CloseSubTask(issueRef);
        }
Ejemplo n.º 2
0
        private async void btnSubmit_Click(object sender, EventArgs e)
        {
            this.btnSubmit.Enabled = false;

            DataTable dataTable = dgvSubTaskTable.DataSource as DataTable;

            if (dataTable != null)
            {
                string SubTaskKey = "";
                string MEO        = "";

                int rowCount = dataTable.Rows.Count;
                for (int k = 0; k < rowCount; k++)
                {
                    DataRow row = dataTable.Rows[k];

                    SubTaskKey = row["SubTaskKey"] as string;
                    MEO        = row["MEO"] as string;

                    if (!String.IsNullOrEmpty(SubTaskKey) &&
                        !String.IsNullOrEmpty(MEO) &&
                        MEO.Trim().Length > 0)
                    {
                        IssueRef issueRef = new IssueRef();
                        issueRef.key = SubTaskKey;

                        var issue = await JiraProxy.LoadIssue(issueRef);

                        if (issue == null || issue.fields == null)
                        {
                            return;
                        }

                        issue.fields.customfield_14101       = new MEOOption();
                        issue.fields.customfield_14101.value = MEO;

                        JiraProxy.UpdateSubTask(issue);
                    }
                }
            }

            this.btnSubmit.Enabled = true;
        }
Ejemplo n.º 3
0
        public async void updateSubTask(string subTaskKey, string assignee)
        {
            IssueRef issueRef = new IssueRef();

            issueRef.key = subTaskKey;

            var issue = await JiraProxy.LoadIssue(issueRef);

            if (issue == null || issue.fields == null)
            {
                return;
            }

            // https://accelaeng.atlassian.net/rest/api/2/user/[email protected]
            JiraUser jiraUser = new JiraUser();

            jiraUser.name         = assignee;
            issue.fields.assignee = jiraUser;

            JiraProxy.UpdateSubTask(issue);
        }
Ejemplo n.º 4
0
        private async Task <SubTask> GetAssigneeAndStatus(string subTaskKey)
        {
            SubTask subTask = new SubTask();

            IssueRef issueRef = new IssueRef();

            issueRef.key = subTaskKey;

            var issue = await JiraProxy.LoadIssue(issueRef);

            if (issue == null || issue.fields == null)
            {
                return(null);
            }

            subTask.Key           = issue.key;
            subTask.Name          = issue.fields.summary;
            subTask.Assignee      = issue.fields.assignee.displayName;
            subTask.AssigneeEmail = issue.fields.assignee.name;
            subTask.Status        = issue.fields.status.name;
            subTask.Estimation    = 0;

            return(subTask);
        }
Ejemplo n.º 5
0
        private async void btnSync_Click(object sender, EventArgs e)
        {
            this.btnSync.Enabled = false;

            if (jiraIssueList == null || jiraIssueList.Count <= 0)
            {
                this.btnSync.Enabled = true;
                return;
            }

            foreach (var issue in jiraIssueList)
            {
                if (issue.subtasks == null || issue.subtasks.Count <= 0)
                {
                    continue;
                }

                foreach (var key in issue.subtasks.Keys)
                {
                    var subTask = issue.subtasks[key];

                    IssueRef issueRef = new IssueRef();
                    issueRef.key = subTask.key;
                    issueRef.id  = subTask.key;

                    if (subTask == null ||
                        subTask.timespent <= 0 ||
                        subTask.worklogs == null ||
                        subTask.worklogs.Count <= 0)
                    {
                        continue;
                    }

                    var lastWorkLog = subTask.worklogs[subTask.worklogs.Count - 1];
                    var lastAssigneeEmailAddress = lastWorkLog.assigneeEmailAddress;

                    var subTaskItem = await JiraProxy.LoadIssue(issueRef);

                    if (subTaskItem == null || subTaskItem.fields == null)
                    {
                        continue;
                    }

                    if (subTask.assignee == "Jerry Lu")
                    {
                        // https://accelaeng.atlassian.net/rest/api/2/user/[email protected]
                        JiraUser jiraUser = new JiraUser();

                        if ("*****@*****.**" == lastAssigneeEmailAddress)
                        {
                            lastAssigneeEmailAddress = "likko.zhang";
                        }
                        jiraUser.name = lastAssigneeEmailAddress;
                        subTaskItem.fields.assignee = jiraUser;

                        JiraProxy.UpdateSubTask(subTaskItem);
                    }

                    if ("Closed".Equals(issue.status, StringComparison.InvariantCultureIgnoreCase) &&
                        !"Closed".Equals(subTask.status, StringComparison.InvariantCultureIgnoreCase))
                    {
                        if ("Case".Equals(issue.issueType, StringComparison.InvariantCultureIgnoreCase))
                        {
                            if ("Review and Recreate(QA)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Review and Recreate(Dev)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Research Root Cause".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase))
                            {
                                JiraProxy.CloseSubTask(issueRef);
                            }
                        }

                        if ("Bug".Equals(issue.issueType, StringComparison.InvariantCultureIgnoreCase))
                        {
                            if ("Review and Recreate(QA)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Review and Recreate(Dev)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Research Root Cause".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Code Fix(Dev)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Write Test Case(QA)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Execute Test Case(QA)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Write Release Notes(Dev)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase) ||
                                "Review Release Notes(QA)".Equals(subTask.name, StringComparison.InvariantCultureIgnoreCase))
                            {
                                JiraProxy.CloseSubTask(issueRef);
                            }
                        }
                    }
                }
            }

            this.btnSync.Enabled = true;
        }
Ejemplo n.º 6
0
        private async void btnPull_Click(object sender, EventArgs e)
        {
            this.btnPull.Enabled = false;

            DateTime from = this.dtpFrom.Value;
            DateTime to   = this.dtpTo.Value;

            var issues = await JiraProxy.GetUpdatedIssueList(from, to);

            if (issues == null || issues.Count == 0)
            {
                this.btnPull.Enabled = true;
                return;
            }

            jiraIssueList.Clear();
            JiraIssue jiraIssue = null;

            foreach (var issue in issues)
            {
                jiraIssue                      = new JiraIssue();
                jiraIssue.key                  = issue.key;
                jiraIssue.issueType            = issue.fields.issueType.name;
                jiraIssue.name                 = issue.fields.summary;
                jiraIssue.assignee             = issue.fields.assignee.name;
                jiraIssue.assigneeEmailAddress = issue.fields.assignee.emailAddress;
                jiraIssue.assigneeDisplayName  = issue.fields.assignee.displayName;
                jiraIssue.status               = issue.fields.status.name;

                jiraIssue.subtasks = new Dictionary <string, SubTask>();

                if (issue.fields.subtasks == null || issue.fields.subtasks.Count == 0)
                {
                    jiraIssueList.Add(jiraIssue);
                    continue;
                }

                double timeSpentSeconds = 0;
                foreach (var subtask in issue.fields.subtasks)
                {
                    string subTaskKey  = subtask.key;
                    string subTaskName = subtask.fields.summary;
                    bool   isSubTask   = subtask.fields.issuetype.subtask;

                    if (isSubTask && !jiraIssue.subtasks.ContainsKey(subTaskName))
                    {
                        IssueRef issueRef = new IssueRef();
                        issueRef.id  = subTaskKey;
                        issueRef.key = subTaskKey;
                        var subTaskInfo = await JiraProxy.LoadIssue(issueRef);


                        if (subTaskInfo == null)
                        {
                            continue;
                        }

                        SubTask subTaskItem = new SubTask();
                        subTaskItem.key      = subTaskInfo.key;
                        subTaskItem.name     = subTaskInfo.fields.summary;
                        subTaskItem.assignee = subTaskInfo.fields.assignee.displayName;
                        subTaskItem.status   = subTaskInfo.fields.status.name;
                        subTaskItem.MEO      = subTaskInfo.fields.customfield_14101 == null ? "" : subTaskInfo.fields.customfield_14101.value;

                        var worklogs = await JiraProxy.GetWorklogs(issueRef);

                        if (worklogs == null && worklogs.Count == 0)
                        {
                            jiraIssue.subtasks.Add(subTaskItem.name, subTaskItem);
                            continue;
                        }

                        subTaskItem.worklogs = new List <WorkLog>();
                        foreach (var worklog in worklogs)
                        {
                            WorkLog individualWorkLog = new WorkLog();
                            individualWorkLog.assignee             = worklog.author.displayName;
                            individualWorkLog.assigneeEmailAddress = worklog.author.emailAddress;
                            individualWorkLog.timeSpent            = worklog.timeSpent;
                            individualWorkLog.comment = worklog.comment.Replace("\r\n", ";");

                            subTaskItem.worklogs.Add(individualWorkLog);

                            timeSpentSeconds += worklog.timeSpentSeconds;
                        }

                        subTaskItem.timespent = Math.Round((double)subTaskInfo.fields.timespent / 3600, 2);
                        jiraIssue.subtasks.Add(subTaskItem.name, subTaskItem);
                    }
                }

                jiraIssue.timespent = Math.Round((double)timeSpentSeconds / 3600, 2);
                jiraIssueList.Add(jiraIssue);
            }

            DataTable table = new DataTable("Daily Work Log Report");

            table.Columns.Add("No", typeof(int));
            table.Columns.Add("IssueType", typeof(string));
            table.Columns.Add("JiraKey", typeof(string));
            table.Columns.Add("Summary", typeof(string));
            table.Columns.Add("Status", typeof(string));
            table.Columns.Add("Assignee", typeof(string));
            table.Columns.Add("AssigneeQA", typeof(string));
            table.Columns.Add("TimeSpent", typeof(string));
            table.Columns.Add("ReviewAndRecreateQA", typeof(string));
            table.Columns.Add("Assignee1", typeof(string));
            table.Columns.Add("Status1", typeof(string));
            table.Columns.Add("MEO1", typeof(string));
            table.Columns.Add("TimeSpent1", typeof(string));
            table.Columns.Add("ReviewAndRecreateDev", typeof(string));
            table.Columns.Add("Assignee2", typeof(string));
            table.Columns.Add("Status2", typeof(string));
            table.Columns.Add("MEO2", typeof(string));
            table.Columns.Add("TimeSpent2", typeof(string));
            table.Columns.Add("ResearchRootCauseDev", typeof(string));
            table.Columns.Add("Assignee3", typeof(string));
            table.Columns.Add("Status3", typeof(string));
            table.Columns.Add("MEO3", typeof(string));
            table.Columns.Add("TimeSpent3", typeof(string));
            table.Columns.Add("CodeFixDev", typeof(string));
            table.Columns.Add("Assignee4", typeof(string));
            table.Columns.Add("Status4", typeof(string));
            table.Columns.Add("MEO4", typeof(string));
            table.Columns.Add("TimeSpent4", typeof(string));
            table.Columns.Add("WriteTestCaseQA", typeof(string));
            table.Columns.Add("Assignee5", typeof(string));
            table.Columns.Add("Status5", typeof(string));
            table.Columns.Add("MEO5", typeof(string));
            table.Columns.Add("TimeSpent5", typeof(string));
            table.Columns.Add("ExecuteTestCaseQA", typeof(string));
            table.Columns.Add("Assignee6", typeof(string));
            table.Columns.Add("Status6", typeof(string));
            table.Columns.Add("MEO6", typeof(string));
            table.Columns.Add("TimeSpent6", typeof(string));
            table.Columns.Add("WriteReleaseNotesDev", typeof(string));
            table.Columns.Add("Assignee7", typeof(string));
            table.Columns.Add("Status7", typeof(string));
            table.Columns.Add("MEO7", typeof(string));
            table.Columns.Add("TimeSpent7", typeof(string));
            table.Columns.Add("ReviewReleaseNotesQA", typeof(string));
            table.Columns.Add("Assignee8", typeof(string));
            table.Columns.Add("Status8", typeof(string));
            table.Columns.Add("MEO8", typeof(string));
            table.Columns.Add("TimeSpent8", typeof(string));

            int index = 1;

            foreach (var jiraIssueItem in jiraIssueList)
            {
                DataRow row = table.NewRow();
                row["No"]         = index;
                row["IssueType"]  = jiraIssueItem.issueType;
                row["JiraKey"]    = jiraIssueItem.key;
                row["Summary"]    = jiraIssueItem.name;
                row["Status"]     = jiraIssueItem.status;
                row["Assignee"]   = jiraIssueItem.assignee;
                row["AssigneeQA"] = jiraIssueItem.assignee;
                row["TimeSpent"]  = jiraIssueItem.timespent;

                SubTask subTaskReviewAndRecreateQA = jiraIssueItem.subtasks.ContainsKey("Review and Recreate(QA)") ? jiraIssueItem.subtasks["Review and Recreate(QA)"] : null;
                if (subTaskReviewAndRecreateQA != null)
                {
                    row["ReviewAndRecreateQA"] = subTaskReviewAndRecreateQA.key;
                    row["Assignee1"]           = subTaskReviewAndRecreateQA.assignee;
                    row["Status1"]             = subTaskReviewAndRecreateQA.status;
                    row["MEO1"]       = subTaskReviewAndRecreateQA.MEO;
                    row["TimeSpent1"] = subTaskReviewAndRecreateQA.timespent;
                }

                SubTask subTaskReviewAndRecreateDev = jiraIssueItem.subtasks.ContainsKey("Review and Recreate(Dev)") ? jiraIssueItem.subtasks["Review and Recreate(Dev)"] : null;
                if (subTaskReviewAndRecreateDev != null)
                {
                    row["ReviewAndRecreateDev"] = subTaskReviewAndRecreateDev.key;
                    row["Assignee2"]            = subTaskReviewAndRecreateDev.assignee;
                    row["Status2"]    = subTaskReviewAndRecreateDev.status;
                    row["MEO2"]       = subTaskReviewAndRecreateDev.MEO;
                    row["TimeSpent2"] = subTaskReviewAndRecreateDev.timespent;
                }

                SubTask subTaskResearchRootCause = jiraIssueItem.subtasks.ContainsKey("Research Root Cause") ? jiraIssueItem.subtasks["Research Root Cause"] : null;
                if (subTaskResearchRootCause != null)
                {
                    row["ResearchRootCauseDev"] = subTaskResearchRootCause.key;
                    row["Assignee3"]            = subTaskResearchRootCause.assignee;
                    row["Status3"]    = subTaskResearchRootCause.status;
                    row["MEO3"]       = subTaskResearchRootCause.MEO;
                    row["TimeSpent3"] = subTaskResearchRootCause.timespent;
                }

                SubTask subTaskCodeFixDev = jiraIssueItem.subtasks.ContainsKey("Code Fix(Dev)") ? jiraIssueItem.subtasks["Code Fix(Dev)"] : null;
                if (subTaskCodeFixDev != null)
                {
                    row["CodeFixDev"] = subTaskCodeFixDev.key;
                    row["Assignee4"]  = subTaskCodeFixDev.assignee;
                    row["Status4"]    = subTaskCodeFixDev.status;
                    row["MEO4"]       = subTaskCodeFixDev.MEO;
                    row["TimeSpent4"] = subTaskCodeFixDev.timespent;
                }

                SubTask subTaskWriteTestCaseQA = jiraIssueItem.subtasks.ContainsKey("Write Test Case(QA)") ? jiraIssueItem.subtasks["Write Test Case(QA)"] : null;
                if (subTaskWriteTestCaseQA != null)
                {
                    row["WriteTestCaseQA"] = subTaskWriteTestCaseQA.key;
                    row["Assignee5"]       = subTaskWriteTestCaseQA.assignee;
                    row["Status5"]         = subTaskWriteTestCaseQA.status;
                    row["MEO5"]            = subTaskWriteTestCaseQA.MEO;
                    row["TimeSpent5"]      = subTaskWriteTestCaseQA.timespent;
                }


                SubTask subTaskExecuteTestCaseQA = jiraIssueItem.subtasks.ContainsKey("Execute Test Case(QA)") ? jiraIssueItem.subtasks["Execute Test Case(QA)"] : null;
                if (subTaskExecuteTestCaseQA != null)
                {
                    row["ExecuteTestCaseQA"] = subTaskExecuteTestCaseQA.key;
                    row["Assignee6"]         = subTaskExecuteTestCaseQA.assignee;
                    row["Status6"]           = subTaskExecuteTestCaseQA.status;
                    row["MEO6"]       = subTaskExecuteTestCaseQA.MEO;
                    row["TimeSpent6"] = subTaskExecuteTestCaseQA.timespent;
                }

                SubTask subTaskWriteReleaseNotesDev = jiraIssueItem.subtasks.ContainsKey("Write Release Notes(Dev)") ? jiraIssueItem.subtasks["Write Release Notes(Dev)"] : null;
                if (subTaskWriteReleaseNotesDev != null)
                {
                    row["WriteReleaseNotesDev"] = subTaskWriteReleaseNotesDev.key;
                    row["Assignee7"]            = subTaskWriteReleaseNotesDev.assignee;
                    row["Status7"]    = subTaskWriteReleaseNotesDev.status;
                    row["MEO7"]       = subTaskWriteReleaseNotesDev.MEO;
                    row["TimeSpent7"] = subTaskWriteReleaseNotesDev.timespent;
                }

                SubTask subTaskReviewReleaseNotesQA = jiraIssueItem.subtasks.ContainsKey("Review Release Notes(QA)") ? jiraIssueItem.subtasks["Review Release Notes(QA)"] : null;
                if (subTaskReviewReleaseNotesQA != null)
                {
                    row["ReviewReleaseNotesQA"] = subTaskReviewReleaseNotesQA.key;
                    row["Assignee8"]            = subTaskReviewReleaseNotesQA.assignee;
                    row["Status8"]    = subTaskReviewReleaseNotesQA.status;
                    row["MEO8"]       = subTaskReviewReleaseNotesQA.MEO;
                    row["TimeSpent8"] = subTaskReviewReleaseNotesQA.timespent;
                }

                table.Rows.Add(row);
                index++;
            }

            this.dgvSubTaskTable.AutoGenerateColumns = false;
            this.dgvSubTaskTable.DataSource          = table;

            this.btnPull.Enabled = true;
            return;
        }
Ejemplo n.º 7
0
        private async void btnCheckJiraKey_Click(object sender, EventArgs e)
        {
            this.btnCheckJiraKey.Enabled = false;

            string jiraKey = this.txtJiraKey.Text;

            IssueRef issueRef = new IssueRef();

            issueRef.key = jiraKey;

            var issue = await JiraProxy.LoadIssue(issueRef);

            if (issue == null || issue.fields == null)
            {
                return;
            }

            this.txtAssignee.Text   = issue.fields.assignee.name;
            this.txtAssigneeQA.Text = issue.fields.customfield_11702 == null ? "" : issue.fields.customfield_11702.name;

            Dictionary <string, string> SubTaskMaper = new Dictionary <string, string>();

            foreach (var subTask in issue.fields.subtasks)
            {
                if (subTask != null && subTask.fields != null && subTask.fields.issuetype.subtask == true)
                {
                    if (!SubTaskMaper.ContainsKey(subTask.fields.summary))
                    {
                        SubTaskMaper.Add(subTask.fields.summary, subTask.key);
                    }
                }
            }

            if ("Case".Equals(issue.fields.issueType.name, StringComparison.InvariantCultureIgnoreCase))
            {
                //this.btnCreateSubTask.Enabled = true;
                //this.chkReviewAndRecreateQA.Enabled = true;
                //this.chkReviewAndRecreateDev.Enabled = true;
                //this.chkResearchRootCause.Enabled = true;

                this.chkCodeFix.Enabled = false;
                //this.chkWriteTestCase.Enabled = false;
                //this.chkExecuteTestCase.Enabled = false;
                //this.chkWriteReleaseNotes.Enabled = false;
                //this.chkReviewReleaseNotes.Enabled = false;

                foreach (string key in SubTaskMaper.Keys)
                {
                    // Review and Recreate(QA)
                    if (this.chkReviewAndRecreateQA.Text == key)
                    {
                        //this.chkReviewAndRecreateQA.Enabled = false;
                        this.txtReviewAndRecreateQASubTaskKey.Text = SubTaskMaper[key];

                        var assignee = await JiraProxy.GetAssigneeByJiraKey(SubTaskMaper[key]);

                        this.txtReviewAndRecreateQAAssignee.Text = assignee;
                    }

                    // Review and Recreate(Dev)
                    if (this.chkReviewAndRecreateDev.Text == key)
                    {
                        //this.chkReviewAndRecreateDev.Enabled = false;
                        this.txtReviewAndRecreateDevSubTaskKey.Text = SubTaskMaper[key];

                        var assignee = await JiraProxy.GetAssigneeByJiraKey(SubTaskMaper[key]);

                        this.txtReviewAndRecreateDevAssignee.Text = assignee;
                    }

                    // Research Root Cause
                    if (this.chkResearchRootCause.Text == key)
                    {
                        //this.chkResearchRootCause.Enabled = false;
                        this.txtResearchRootCauseSubTaskKey.Text = SubTaskMaper[key];

                        var assignee = await JiraProxy.GetAssigneeByJiraKey(SubTaskMaper[key]);

                        this.txtResearchRootCauseAssignee.Text = assignee;
                    }
                }
            }


            if ("Bug".Equals(issue.fields.issueType.name, StringComparison.InvariantCultureIgnoreCase))
            {
                this.btnCreateSubTask.Enabled        = true;
                this.chkReviewAndRecreateQA.Enabled  = false;
                this.chkReviewAndRecreateDev.Enabled = false;
                this.chkResearchRootCause.Enabled    = false;

                this.chkCodeFix.Enabled            = true;
                this.chkWriteTestCase.Enabled      = true;
                this.chkExecuteTestCase.Enabled    = true;
                this.chkWriteReleaseNotes.Enabled  = true;
                this.chkReviewReleaseNotes.Enabled = true;

                foreach (string key in SubTaskMaper.Keys)
                {
                    // Code Fix(Dev)
                    if (this.chkCodeFix.Text == key)
                    {
                        this.chkCodeFix.Enabled        = false;
                        this.txtCodeFixSubTaskKey.Text = SubTaskMaper[key];
                    }

                    // Write Test Case(QA)
                    if (this.chkWriteTestCase.Text == key)
                    {
                        this.chkWriteTestCase.Enabled        = false;
                        this.txtWriteTestCaseSubTaskKey.Text = SubTaskMaper[key];
                    }

                    // Execute Test Case(QA)
                    if (this.chkExecuteTestCase.Text == key)
                    {
                        this.chkExecuteTestCase.Enabled        = false;
                        this.txtExecuteTestCaseSubTaskKey.Text = SubTaskMaper[key];
                    }

                    // Write Release Notes(Dev)
                    if (this.chkWriteReleaseNotes.Text == key)
                    {
                        this.chkWriteReleaseNotes.Enabled        = false;
                        this.txtWriteReleaseNotesSubTaskKey.Text = SubTaskMaper[key];
                    }

                    // Review Release Notes(QA)
                    if (this.chkReviewReleaseNotes.Text == key)
                    {
                        this.chkReviewReleaseNotes.Enabled        = false;
                        this.txtReviewReleaseNotesSubTaskKey.Text = SubTaskMaper[key];
                    }
                }
            }

            this.btnCreateSubTask.Enabled = true;
            this.btnCheckJiraKey.Enabled  = true;
        }
Ejemplo n.º 8
0
        private async void btnAssign_Click(object sender, EventArgs e)
        {
            this.btnAssign.Enabled = false;

            DataTable dataTable = dgvWorkLogReport.DataSource as DataTable;

            if (dataTable != null)
            {
                string Name            = "";
                string EmailAddress    = "";
                string Effort          = "";
                string SubTaskID       = "";
                string SubTaskSummary  = "";
                string SubTaskAssignee = "";
                string SubTaskComment  = "";
                string JiraKey         = "";
                string JiraSummary     = "";

                int rowCount = dataTable.Rows.Count;
                for (int k = 0; k < rowCount; k++)
                {
                    DataRow row = dataTable.Rows[k];

                    Name            = row["Name"] as string;
                    EmailAddress    = row["EmailAddress"] as string;
                    Effort          = row["Effort"] as string;
                    SubTaskID       = row["SubTaskID"] as string;
                    SubTaskSummary  = row["SubTaskSummary"] as string;
                    SubTaskAssignee = row["SubTaskAssignee"] as string;
                    SubTaskComment  = row["SubTaskComment"] as string;
                    JiraKey         = row["JiraKey"] as string;
                    JiraSummary     = row["JiraSummary"] as string;

                    if (!String.IsNullOrEmpty(SubTaskID) &&
                        !Name.Equals(SubTaskAssignee, StringComparison.InvariantCultureIgnoreCase))
                    {
                        IssueRef issueRef = new IssueRef();
                        issueRef.key = SubTaskID;

                        var issue = await JiraProxy.LoadIssue(issueRef);

                        if (issue == null || issue.fields == null)
                        {
                            return;
                        }

                        // https://accelaeng.atlassian.net/rest/api/2/user/[email protected]
                        JiraUser jiraUser = new JiraUser();

                        if ("*****@*****.**" == EmailAddress)
                        {
                            EmailAddress = "likko.zhang";
                        }
                        jiraUser.name         = EmailAddress;
                        issue.fields.assignee = jiraUser;

                        JiraProxy.UpdateSubTask(issue);
                    }
                }
            }

            this.btnAssign.Enabled = true;
        }