TFS API Part 52 – Getting Work Item History

Wednesday, October 30, 2013

Tweet Work Item History field isn’t just a Text field that shows all the changes in a specific work items, it’s a collection of Revision object. Each time you save a Work Item a new revision object is been create and represent the Work Item Latest values. You can use the History to get previous values from Fields, Links and Attachments history. In this post I’ll show how to get Work Item revision list and display the Fields of specific revision. Download Demo Project Step 1: Connecting To TFS And Getting Work Item Store private void btnConnect_Click(object sender, RoutedEventArgs e) { TeamProjectPicker tpp...

TFS API Part 51 – Adding Test Step & Shared Step

Monday, October 7, 2013

Working TFS API for Test Cases is different from Work Items, the usage is different and this cause many of customer to send me questions regarding Test Case API. This post will demonstrate how to create new Test Case, Adding Steps, Step Attachments, Shared Steps and more. As always we need to start with connecting TFS Object Model: TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false); if (tpp.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; TfsTeamProjectCollection Tfs = tpp.SelectedTeamProjectCollection; For Work Items we need to obtain WorkItemStore object, but for Test Cases we need to work with ITestManagmentTeamProject object. ITestManagementServiceservice = (ITestManagementService)Tfs.GetService(typeof(ITestManagementService)); ITestManagementTeamProject TestProject = (ITestManagementTeamProject)service.GetTeamProject(tpp.SelectedProjects.Name); The ITestManagmentTeamProject contains many helpers for Test API TestPlans...

TFS API Part 50 – Get Team Project Template

Sunday, July 21, 2013

In my last post TFS 2012 Upgrade Process Template–Guide I’ve talked about upgrading an existing Team Project Template to another or a newer template. An important part of the upgrading process is knowing from what template you are upgrading from – although this is not really important because the base template can be modified completely. So here is a simple tool to display the Base Process Template name. Download Demo Project Step 1: Connect TFS and Getting Team Projects Create WPF Application, and add the basic code for connecting...

TFS API Part 49 – Delete Team Project

Wednesday, February 20, 2013

There are many improvements in TFS API for 2012 version, in my previous post I’ve talked about TFS API Part 48 – WorkItemControl And Bypass Work Item Rules that allow work item creation with bypass rule mode in WorkItemStore that allow you to create and change any field value without applying the WorkItem template rules. in this post I’ll show how to delete Team Project using TFS API, be aware Delete Team Project is unrecoverable! Download Demo Project Step 1: Connect TFS and Getting Team Projects Create WPF Application, and add the basic...

TFS API Part 48 – WorkItemControl And Bypass Work Item Rules

It’s been a while since I wrote about TFS API, not because there is no more about it is because I worked on Windows Store for the past couple of months so I didn’t had the time. More About TFS API So today post will be about two changes in TFS 2012, the first one is WorkItemControl based on WPF that replaced the WorkItemFormControl based on WinForms, the second will be about WorkItemStore bypass rule – Allowing you to save and change work item values without obeying the work item rules. Download Demo Project...

TFS API Part 47 (VS11) – Manage Iterations Dates

Monday, May 28, 2012

Tweet Over the last posts I talked about “TFS API Part 46 (VS11) – Team Settings”, in this post I’ll show how to get and change Iteration Dates from TFS API. We’ll show all Teams under a specific Team Project and once you click on a Team you will see its Iterations and Dates. Download Demo Project Step 1: Create Project and Add Reference Create an WPF application and add the following references: First add reference for: Microsoft.TeamFoundation.Build.Client (11.0.0.0) Microsoft.TeamFoundation.Build.Common.dll  (11.0.0.0) ...

TFS API Part 46 (VS11) – Team Settings

Wednesday, May 23, 2012

Tweet In the previous posts “TFS API Part 45 (VS11) – Modify Teams and Team Members” I talked about Teams, from getting all team to modify and creating new Team using TFS API. Now, Teams are more than just a “Security Group”, they hold specific settings such as relevant Areas/Iteration for that Team. The “Team” can be assigned to Backlog Iteration (Set as Team’s backlog Iteration), this takes all paths under that iteration and add them to the team backlog. You can also change the Iteration backlog to another path (not just the root), you just need at...

TFS API Part 45 (VS11) – Modify Teams and Team Members

Monday, May 21, 2012

Tweet In my previous post “Teams and Team Members”  I talked about new Service in TFS API called – TfsTeamService. Using this service we can control Teams and Team Members under TFS. We can create and remove Teams and Team Members using TFS API. I know this can be quite confusing but Teams in TFS are simply Group (Security Group), same as Contributors, Administrators etc. If you open Security tab under TFS Web Management you can see that there is two separate lists of Groups – Teams and TFS Groups, I’ll show how to separate between Teams and...

TFS API Part 44 (VS11) – Teams and Team Members

Sunday, May 20, 2012

Tweet TFS 11 comes with many great changes for software development, the first and super important is Teams, until TFS 11 Task work item or any other work item has to be assign to individual, means that you can’t assign a Task to a Scrum Team etc… So many people has built customize solution to handle this but no need! because TFS 11 comes with this great Feature! In TFS Web Management site you can add as many teams as you want under One Team Project. If your team works with Scrum then you should have...

TFS API Part 43–Delete Work Item Tool

Friday, April 6, 2012

Tweet In previous post - TFS API Part 21: Delete Work Item using WorkItemStore (Demo Application) I showed how to delete Work Items from TFS using TFS API. My problem was that it not easy to delete work items one by one so I decided to build a tool based on TFS Queries to allow me easily select the work items I want to delete. You can download executable from Here You can download Source Code from Here *** Deleting Work Item Action Is Not Recoverable *** Enjoy