aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.TFS
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-07 17:19:25 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-07 17:19:25 +0200
commit2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016 (patch)
tree5e4332a86e760aae0e50bfe643f64a0c74046b6a /Software/Visual_Studio/Tango.TFS
parentbd3cb640be12621ac37253e8a8c627ae40692e4d (diff)
downloadTango-2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016.tar.gz
Tango-2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016.zip
Fixed and improved bug reporting in machine studio.
Diffstat (limited to 'Software/Visual_Studio/Tango.TFS')
-rw-r--r--Software/Visual_Studio/Tango.TFS/Area.cs11
-rw-r--r--Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs39
2 files changed, 39 insertions, 11 deletions
diff --git a/Software/Visual_Studio/Tango.TFS/Area.cs b/Software/Visual_Studio/Tango.TFS/Area.cs
index a79f9c0f1..956cbe8cf 100644
--- a/Software/Visual_Studio/Tango.TFS/Area.cs
+++ b/Software/Visual_Studio/Tango.TFS/Area.cs
@@ -10,5 +10,16 @@ namespace Tango.TFS
{
public String Name { get; set; }
public String Path { get; set; }
+ public List<Area> SubAreas { get; set; }
+
+ public Area()
+ {
+ SubAreas = new List<Area>();
+ }
+
+ public override string ToString()
+ {
+ return Name;
+ }
}
}
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
{