public static WorkItemTypeEnum GetWorkItemType(JiraStory story)
        {
            var issueType = story.IssueType.ToUpperNullSafe();

            switch (issueType)
            {
            case "ANALYSIS": return(WorkItemTypeEnum.Analysis);

            case "ARCHITECTURAL ISSUE": return(WorkItemTypeEnum.ArchitecturalIssue);

            case "CHORE": return(WorkItemTypeEnum.Chore);

            case "CONTINGENCY": return(WorkItemTypeEnum.Contingency);

            case "DEFECT" when story.DefectType == "Current": return(WorkItemTypeEnum.NewDefect);

            case "DEFECT" when story.DefectType != "Current": return(WorkItemTypeEnum.LegacyDefect);                        // default to legacy, but maybe could benefit from more analysis here

            case "EPIC": return(WorkItemTypeEnum.Epic);

            case "FEATURE REQUEST": return(WorkItemTypeEnum.FeatureRequest);

            case "STORY": return(WorkItemTypeEnum.Feature);

            case "SUB-TASK": return(WorkItemTypeEnum.SubTask);

            case "TECHNICAL DEBT": return(WorkItemTypeEnum.Chore);

            case "UI TEST": return(WorkItemTypeEnum.UITest);

            case "UI TEST (SUBTASK)": return(WorkItemTypeEnum.UITest);

            default: throw new NotImplementedException($"Could not map Jira issue {story.Id} ('{issueType}') to a work item type");
            }
        }
Пример #2
0
 public JiraStorySummary(JiraStory story)
 {
     this.Id          = story.Id;
     this.EpicStoryId = story.EpicStoryId;
     this.IssueType   = story.IssueType;
     this.Status      = story.Status;
     this.Title       = story.Title;
     this.StoryPoints = story.StoryPoints;
     this.Labels      = story.Labels;
 }
        public static WorkItemStatusEnum GetWorkItemStatus(JiraStory story)
        {
            var status = story.Status.ToUpperNullSafe();

            switch (status)
            {
            case "DECLINED":
            case "TEMPLATE":
                return(WorkItemStatusEnum.NotShipped);

            case "DEFECT BACKLOG":
            case "NEEDS TRIAGED":
            case "IN TRIAGE":
            case "RELEASE COMMITMENT":
            case "COMMITTED":
            case "TO DO":
                return(WorkItemStatusEnum.NotStarted);

            // for the purposes of running metrics, anything that's in process is counted as "shipped". That's because the stories sometimes
            // linger in the final stages of the flow at the end of a release, and we want to be able to run metrics without waiting for
            // everything to be fully in "done done"
            case "ARCHIVED":
            case "CODE REVIEW":
            case "DEVELOPMENT":
            case "DEVELOPMENT DONE":
            case "DOCUMENTATION":
            case "DONE DONE":
            case "IN PROGRESS":
            case "READY FOR DOCUMENTATION":
            case "TESTING":
            case "TESTING DONE":
            case "UI / UX":
                return(WorkItemStatusEnum.Shipped);

            default: throw new NotImplementedException($"Could not map Jira issue {story.Id} (status '{status}') to a work item status");
            }
        }