diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-07 17:19:25 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-07 17:19:25 +0200 |
| commit | 2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016 (patch) | |
| tree | 5e4332a86e760aae0e50bfe643f64a0c74046b6a /Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs | |
| parent | bd3cb640be12621ac37253e8a8c627ae40692e4d (diff) | |
| download | Tango-2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016.tar.gz Tango-2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016.zip | |
Fixed and improved bug reporting in machine studio.
Diffstat (limited to 'Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs b/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs index 5665caf3c..5c4746567 100644 --- a/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs +++ b/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs @@ -162,15 +162,14 @@ namespace Tango.TFS p.UserStories.Add(story); } - p.Areas.Add(new Area() { Name = project.Name, Path = project.Name }); + var mainArea = new Area() { Name = project.Name, Path = project.Name }; + p.Areas.Add(mainArea); foreach (var area in store.Projects[project.Name].AreaRootNodes.OfType<Node>()) { - p.Areas.Add(new Area() - { - Name = area.Name, - Path = area.Path, - }); + Area a = new Area(); + FillArea(a, area); + mainArea.SubAreas.Add(a); } foreach (var iteration in store.Projects[project.Name].IterationRootNodes.OfType<Node>()) @@ -186,6 +185,21 @@ namespace Tango.TFS }); } + private Area FillArea(Area area, Node node) + { + area.Name = node.Name; + area.Path = node.Path; + + foreach (var child in node.ChildNodes.OfType<Node>()) + { + var subArea = new Area(); + FillArea(subArea, child); + area.SubAreas.Add(subArea); + } + + return area; + } + /// <summary> /// Uploads a work item to the specified team project. /// </summary> @@ -230,12 +244,15 @@ namespace Tango.TFS }); } - patchDocument.Add(new JsonPatchOperation + if (workItem.Iteration != null) { - Operation = Operation.Add, - Path = GetFieldNameForWrite(CoreField.IterationPath), - Value = workItem.Iteration.Path, - }); + patchDocument.Add(new JsonPatchOperation + { + Operation = Operation.Add, + Path = GetFieldNameForWrite(CoreField.IterationPath), + Value = workItem.Iteration.Path, + }); + } patchDocument.Add(new JsonPatchOperation { |
