DCSIMG
February 2007 - Posts - SRL Group

SRL Group

This blog is about Team System, QA and Development methodologies and more...

VSTS Resources

Team System Bloggers

February 2007 - Posts

TFS Custom Controls

Hi everybody!

 

I'm going to talk about a new feature of TFS SP1 – Custom Controls.

I think that it's a great feature that going to complete a full customization of TFS.

The combination of VS2005 Add-on where we can catch the WI, TFS server-side notification services and now the custom controls may provide the full customization scenario!

Hard to think of any customer scenario for which I won’t have a response.

I'm not going to talk about how it works, because you can find all of the information in the great post in the Naren's Blog.

Briefly I can say that the custom control can be any type of win form control.

Moreover, you can take UserControl and inside of it you can place any types of controls with some of your custom logic and interactions between them, depending on the scenario.

I think that the main difficulty is the installation, because you need to redistribute controls definition on each client computer. And of course, SP1 should be installed. It's not easy because you can't install it only for Team Explorer. You should install the full installation of VS2005 SP1. Depressing… but nothing we can to do about it.

 

Basically, being impatient, I've built some little example. The first control in the example is a very simple web browser but with some little "feature" J When you press "Save Link" button I add the current URL as a Hyperlink link to the work item. Its purpose is to check the interaction between custom control code and work item internal fields. And it works!

The second control is a RTF editor. It  checks how a work item hosts and interacts with complicated controls. In other words, how a work item works with UserControls. Additionally I think that the RTF editor can provide some interesting extra functionality like the simple WORD processor.

 

To get the example working you need to run setup project to get the controls installed. I install the controls under the CommonApplicationData.

And you need to define two new fields in one of yours WI to see the controls (you can see the full example in the attached WI):

 

<Control Type="WebBrowserExtended" FieldName="SRL.VisitedUrls" Label="&amp;Web Browser:" LabelPosition="Left" DefaultUrl="http://www.google.com" />

 

<Control Type="RTFEditor" FieldName="SRL.RTFText" Label="&amp;RTF Editor:" LabelPosition="Left" />

 

Enjoy!  

 

That’s all folks…

How to create new mappings to work item fields in MSProject

In this post I'll describe the way to map between custom work item fields  to MS Project.

 

First of all you need to use TFSFieldMapping.exe to download the mapping file for your Team Project. The utility is located in [drive]: \Program Files\Microsoft Visual Studio 8\Common7\IDE

 

1. To download a mapping file

a.        Open a Command Prompt window.

b.       Download the mapping file by using the TFSFieldMapping.exe

TFSFieldMapping download Team_Foundation_Server team_project MappingFile.xml

Where:

Team_Foundation_Server is the computer name of your Team Foundation Server.

team_project is the name of your team project.

MappingFile.xml is the file name and location where the mapping file will be downloaded.

 

2. Now you've got the XML file that you have to edit by adding new nodes in the following way:

>Mapping WorkItemTrackingFieldReferenceName="fieldname"

   ProjectField="projectfield"

   ProjectName="user friendly name"/>          

For example:

<Mapping WrkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Priority"

   ProjectField="pjTaskText19"

   ProjectName="Work Item Priority/>

      Where:        

Microsoft.VSTS.Common.Priority is an existing field in the MSF for Agile Software Development process.

pjTaskText19 is a custom text field in Microsoft Project.

When you insert a ProjectField Attribute use the following table that provides the information about all Work Item Field Types and Microsoft Project Field Types

Work Item Field Type

Microsoft Project Field Type

Integer

Work, units, numbers, and any field type with a range of -2,147,483,648 to 2,147,483,647.

Double

Work, units, percentages, fractions, and any field type with a range of ±5.0 × 10−324 to ±1.7 × 10308.

String

Text (maximum of 255 characters.)

DateTime

Datetime.

TreePath

Custom outline codes.

Html

Not Supported.

PlainText

Not Supported.

History

Not Supported.

 

After finishing all changes save your file and upload it by using the same utility.

3. To upload a mapping file

a.        Upload the mapping file by using the TFSFieldMapping.exe utility by typing the following at the command prompt:

TFSFieldMapping upload Team_Foundation_Server team_project MappingFile.xml

Where:

Team_Foundation_Server is the computer name of your Team Foundation Server.

team_project is the name of your team project.

MappingFile.xml is the file name and location from where the mapping file will be uploaded.

 

 

Team System Outlook Addin - v1.0

Let’s face it, not everybody spends every minutes of their time working in Visual Studio 2005. Think about business analysts, designers, project managers and general managers J - not the typical Visual studio user but heavy outlook users. Unlike TeamLook, our plug-in is not a commercial product, but we've been using it successfully on several sites for quite some time, and decided to share it now.

Using this tool you can:

  • Create work item directly from email messages
  • Submit and edit work items
  • Execute stored queries
  • Find work items by ids
  • Export stored queries results
  • Send work items data and queries results by mail

Download available from here. We are working now on Outlook 2K7 version. Hopefully we’ll share it in a few days.

Enjoy