Example #1
0
        public JiraIssueModel Read()
        {
            JiraIssueModel result = new JiraIssueModel
            {
                Key            = issue.Key.Value,
                Type           = issue.Type.Name,
                Priority       = issue.Priority.Name,
                Components     = GetComponents(issue),
                Labels         = GetLabels(issue),
                Project        = issue.Project,
                Assignee       = issue.Assignee,
                Reporter       = issue.Reporter,
                CreatedAt      = issue.Created,
                UpdatedAt      = issue.Updated,
                Description    = issue.Description,
                Summary        = issue.Summary,
                Status         = issue.Status.Name,
                Resolution     = issue.Resolution?.Name,
                ResolutionDate = issue.ResolutionDate,
                DueDate        = issue.DueDate,
            };

            foreach (var cf in issue.CustomFields)
            {
                if (cf.Values.Length == 0)
                {
                    result.CustomFields.Add(cf.Name, "<NULL>");
                }
                else
                {
                    result.CustomFields.Add(cf.Name, cf.Values[0]);
                }
            }

            //not sure whether this should be here or in JiraIssueModel as derived attribute
            try { result.DefinitionOfDone = result.CustomFields["Definition of Done"]; } catch { }
            try { result.AcceptanceCriteria = result.CustomFields["Acceptance Criteria"]; } catch { }

            return(result);
        }
Example #2
0
 public void Save(JiraIssueModel LoginInformation)
 {
     throw new NotImplementedException();
 }