コード例 #1
0
ファイル: Jira.cs プロジェクト: Chaliapine/JiraTFS
        public WorkItem CreateWorkItem(Tfs tfs, Issue issue)
        {
            var tfsConfig = ConfigurationManager.GetSection("tfs") as TfsConfigSection;
            var workItem  = new WorkItem(tfs.TeamProject.WorkItemTypes["Bug"]);

            SyncFields(workItem, issue);
            workItem.IterationPath = tfsConfig.DefaultIterationPath;
            workItem.Fields["Repro steps"].Value = "См. Исходное замечание";

            workItem.Save(SaveFlags.MergeAll);
            tfs.SyncFields(workItem, this);
            var correspondings = _store.AddBug(workItem.Id, issue.Key);

            logger.WriteInfo(p => p.JMessage(Site.Tfs, Operation.Create, Artifact.WorkItem, workItem.Id.ToString(), workItem.Id.ToString(), issue.Key));
            return(workItem);
        }