示例#1
0
        public static JiraCreateIssueResult CreateIssue(JiraCredentials credential, JiraIssueModel newIssue)
        {
            var DataObj = new ActualJiraIssueModel {
                Fields = newIssue
            };
            var response = JiraUtility.Post <ActualJiraIssueModel, JiraBaseResponseModel>("issue", credential, DataObj, HttpStatusCode.Created);

            return(new JiraCreateIssueResult(response));
        }
示例#2
0
        public static BaseJiraResult EditIssue(JiraCredentials credential, JiraIssueModel Issue)
        {
            var DataObj = new ActualJiraIssueModel {
                Fields = Issue
            };
            var response = JiraUtility.Put <ActualJiraIssueModel, JiraEmptyResponseModel>($"issue/{Issue.IssueIdOrKey}", credential, DataObj, HttpStatusCode.NoContent);

            return(new BaseJiraResult {
                ErrorMessage = response.ErrorMessage, Status = response.Status, HttpStatus = response.HttpStatus
            });
        }