示例#1
0
        public async Task <string> createSubTask(string issueKey, string summary, string description)
        {
            IssueRef issueRef = new IssueRef();

            issueRef.key = issueKey;

            var issue = await JiraProxy.CreateSubTask(summary, description, issueRef);

            return(issue.key);
        }
        public async Task <string> createSubTask(string summary, string issueKey)
        {
            IssueRef issueRef = new IssueRef();

            issueRef.key = issueKey;

            string description = "";

            if ("Review and Recreate(QA)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log QA effort spent on reviewing and recreating the assicaited production case{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when this case is recreated";
            }

            if ("Review and Recreate(Dev)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log Dev effort spent on reviewing and recreating the assicaited production case{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when this case is recreated";
            }

            if ("Research Root Cause" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log Dev effort spent on researching root cause after the assicaited production case is recreated{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when this root cause is found";
            }

            // Code Fix(Dev)
            if ("Code Fix(Dev)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log Dev effort spent on solving the assicaited production bug{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when it is done";
            }

            // Write Test Case(QA)
            if ("Write Test Case(QA)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log QA effort spent on writing test case for the assicaited production bug{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when it is done";
            }

            // Execute Test Case(QA)
            if ("Execute Test Case(QA)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log QA effort spent on executing test case for the assicaited production bug{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when it is done";
            }

            // Write Release Notes(Dev)
            if ("Write Release Notes(Dev)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log Dev effort spent on writing release notes for the assicaited production bug{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when it is done";
            }

            // Review Release Notes(QA)
            if ("Review Release Notes(QA)" == summary)
            {
                description =
                    @"*{color:red}Notice{color}*: 
* {color:red}Just log QA effort spent on reviewing release notes for the assicaited production bug{color}
* {color:red}Please DO NOT add comment in the sub task{color}

Following the below steps if you work on this sub task
# Assign this sub task to you
# Log all your effort spent on this case
# Post your comment in the parent jira ticket if neccessary
# Close this sub task when it is done";
            }

            var issue = await JiraProxy.CreateSubTask(summary, description, issueRef);

            return(issue.key);
        }