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 2012 Upgrade Process Template–Guide

Thursday, July 18, 2013

Many customers are upgrading from TFS 2010 or earlier versions to TFS 2012 and in near future will upgrade to TFS 2013. As Microsoft making the upgrade process of TFS a very smooth process there are still things we need to upgrade in our Team Project process template things that will not happened in the TFS Upgrade Process. So which things? the Team Project Process Template – Work Items, Queries, Reports, Categories and more. There are couple of scenarios you interesting in: Upgrade the same Process Template to the latest version. ...

VS/TFS 2012 Update 2 & Update 3 CTP

Wednesday, May 8, 2013

Couple of days ago Brian Harry post about the new release of Update 2 for Visual Studio and TFS 2012, and today another release of Update 3 that isn’t big a Update 1 and 2 but contains a set of bug fixes that can ease you work. Before jumping to Update 3, if for some reason you’re not using Update 2 this is the time to read about it and install it! Update 2 VS/TFS 2012.2 (Update 2) Visual Studio 2012 Update 2 (VS 2012.2) ISOs available ...

איך להגדיר ימי חופש של סבב פיתוח – יום שישי במקום ראשון

Sunday, March 3, 2013

אחד השינויים ב – TFS 11 מאפשר לנו להגדיר קבוצות פיתוח והגדרה של סבבי פיתוח עם תאריך התחלה וסיום (Sprint, Iteration וכו). כאשר מתחילים לתכנן סבב פיתוח נראה חישוב של סה”כ ימי העבודה בסבב הנוכחי, אך סה”כ הימים לא יסתדר לכם כי הוא מחשב שיום ראשון אינו יום עבודה. זאת שאלה שאני מקבל מהרבה לקוחות – איך אני משנה את תצוגת ה – Backlog שתתאים לימי המנוחה בארץ (שישי ושבת ולא שבת וראשון). לדוגמא – אם הגדרנו סבב פיתוח מה – 3 לפברואר עד ה – 14 לפברואר – מדובר על 12 ימים סה”כ ו-10 ימי פיתוח אבל אנחנו נראה סה”כ 9 ימי...

TFS API Part 48 – WorkItemControl And Bypass Work Item Rules

Wednesday, February 20, 2013

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...

Work Item Spell Checker–Test Case Steps Support

Monday, February 27, 2012

Tweet Couple of mounts ago I published the Work Item Spell Checker Custom Control for VS 2010 on CodePlex, since than I received requests for enabling Test Case Steps Spell Checking, I made some changes for the project to enable this and now you can run Spell Check on Test Steps. Download Work Item Spell Checker Custom Control Because the steps control cannot be effected on run time from code after you finish the Spell Check you need to refresh the item to see the results. Download Work Item Spell Checker Custom Control...

The Git Hole

Wednesday, January 25, 2012

Tweet I consider myself a calm person with plenty of tolerance, I believe in productive discussion and love it – Part of my job as a consultant is to talk with Teams and explain them why you should choose a specific product over another, in 99.9% of those meetings there is one guy that don’t like the change (No One Like Changes) and you need in a calm way to explain and show him the benefits of the new tool – Forcing someone to do something is never a good thing. But sometimes there is no wining side in a discussion,...

Validate Field Format in Work Items using MATCH Element

Sunday, December 18, 2011

Tweet Today I got a interesting questions from a customer – How I can force format to a version field? I said cool finally I can use the MATCH Element (Work Item Type Definition Schema) to set a regex for System.Title field, The MATCH rule doesn't support full regular expressions, but a simplified version. <MATCH pattern="pattern to match" for="user name" not="user name" /> Enforces basic pattern matching for strings only. <pattern> should be replaced with the match pattern. Valid values are "A", "N", "X", all other values are taken as literals. "A" represents an alpha...

How To Change TFS 2010 Attachment Size

Monday, July 18, 2011

CodeProject Here is a post from 2008 on how to change attachment size in TFS 2008, the same concept is available in 2010 but there is a small confusion about 2010. Many people had problems changing the attachment size in TFS 2010 using the same web service because the following error: 500 Internal Server Error There where people who changes the attachment size using code:TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(@"yourtfsserver/.../DefaultCollection");ITeamFoundationRegistry rw = tfs.GetService<ITeamFoundationRegistry>(); RegistryEntryCollection rc = rw.ReadEntries(@"/Service/WorkItemTracking/Settings/MaxAttachmentSize");RegistryEntry re = new RegistryEntry(@"/Service/WorkItemTracking/Settings/MaxAttachmentSize", "20971520");//20MB        if (rc.Count != 0){        re = rc.First();        re.Value = "20971520";}        rw.WriteEntries(new List<RegistryEntry>() { re }); But the only thing you had to...