2017-08-25 10 views
0

TFS 2015でプロジェクト内の領域を作成します。領域が追加されると、その領域の作業項目はチームのバックログに表示されません。デフォルトでは領域が選択されていないため、この場合はtestareaが選択されていないためです。ここでAPIを使用してTFSで領域選択を設定する方法

testArea is not selected

は、私がこれまでにエリアを作成した方法は次のとおりです。それはチェックマークが表示されるように

/* 
* Grabs the necessary connections to the server, as well as the required 
* clients 
*/ 
static void loadFromServer() 
{ 
    // Connect to TFS 
    VssConnection connection = new VssConnection(new Uri(collectionUri), 
    new VssCredentials()); 

    // Get the project collection that the project is a part of 
    TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri 
    (collectionUri)); 

    // Get the version control server from the team project collection 
    VersionControlServer vcs = tpc.GetService<VersionControlServer>(); 

    string projectName = "SomeProject"; 

    // Get the project from the version control server 
    static TeamProject project = vcs.GetTeamProject(projectName); 

    // Get the ICommonStructureService to create the area 
    static ICommonStructureService commonStructures = 
    tpc.GetService<ICommonStructureService>(); 
} 

/* 
* Create the new area 
*/ 
static void createArea() 
{ 
    // Root area of the project 
    NodeInfo rootAreaNode = commonStructures.GetNodeFromPath(projectName 
    + "\\Area"); 

    string areaName = "SomeArea"; 
    // Create the new area node 
    string newAreaUri = commonStructures.CreateNode(areaName, 
    rootAreaNode.Uri); 

    Console.WriteLine(areaName + " created."); 
} 

は、どのように私は、私が作成した新しい領域を選択するに行きますかその左側のチェックボックスに、私のチームがバックログ内の作業項目を表示できるようにしますか?

答えて

1

私のテストに基づいて、APIを使用して領域を選択することはできません。私は機能を提案するためにuser voice hereを提出した、あなたは行くことができますし、機能でそれを達成するためにそれを投票する。

公式文書Work item classification nodesによれば、エリアデータを選択/更新するためのREST APIはありません。我々はMove an area nodeしかできません。

しかし、選択領域の動作を追跡するツールでは、領域を選択するときに呼び出されるAPIを取得できます。ポストアクションを実行するには、トークンが必要ですが、トークンは動的です。したがって、静的トークンを使用してAPIを呼び出して領域データを更新することはできません(領域の選択)。

enter image description here

関連する問題