Practices at a Glance: Project Management

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode, Kevin Jones

Index

Check-in Policies

  • How to set up check-in policies to enforce code quality
  • How to set up check-in policies to ensure that developers associate work items with check-ins
  • How to set up check-in policies to enforce coding standards

Project Management

  • How to use Microsoft Project to manage your project
  • How to use Microsoft Excel to manage your project
  • How to create a minimal process template
  • How to customize a process template
  • How to customize a work item type within a process template
  • How to customize a work item type within an existing team project
  • How to create an iteration
  • How to create an area
  • How to add a check-in event notification
  • How to set up a report dashboard
  • How to create folders in your source control repository
  • How to delete a project from Team Foundation Server

Check-in Policies

  • How to set up check-in policies to enforce code quality
  • How to set up check-in policies to ensure that developers associate work items with check-ins
  • How to set up check-in policies to enforce coding standards

How to Set Up Check-in Policies to Enforce Code Quality

Use a combination of code analysis and testing policies to enforce a standard of code quality. For example, use the testing policy available out-of-box with VSTS, to ensure that specific tests are executed and passed prior to allowing source to be checked into Microsoft® Visual Studio® 2005 Team Foundation Server (TFS) source control. You can also configure a code analysis policy to help ensure that your code meets certain quality standards by ensuring that security, performance, portability, maintainability, and reliability rules are passed.

By enforcing this type of check-in policy in addition to policies that enforce coding standards and guidelines, you ensure that your code meets a specific code quality gate.

To enforce a code analysis check-in policy for a team project
  1. In Team Explorer, right-click your team project, point to Team Project Settings, and then click Source Control.
  2. Click the Check-in Policy tab.
  3. Click Add and then select and configure the appropriate policy.

Additional Resources

How to Set Up Check-in Policies to Ensure That Developers Associate Work Items with Check-ins

Configure the out-of-box Work Item check-in policy, so that developers are forced to associate work items with a check-in. This association helps maintain traceability between the changes made to the source code and the work items tracking bugs and tasks.

To configure the work item check-in policy to force developers to associate check-ins with a work item
  1. In Team Explorer, right-click your team project, select Team Project Settings, and then click Source Control.
  2. Click the Check-in Policy tab.
  3. Click Add and then select and configure the Work Item check-in policy.

Additional Resources

  • For more information about creating and using a custom check-in policy, see “How To – Step Through Creating Custom Check-in Policies for TFS” in this guide.
  • To learn how to customize a check-in policy, see “Walkthrough: Customizing Check-in Policies and Notes” at http://msdn2.microsoft.com/en-us/library/ms181281(VS.80).aspx

How to Set Up Check-in Policies to Enforce Coding Standards

The code analysis check-in policies that ship with Team Foundation Server enable you to automatically run static code analysis on code as it is checked in, to ensure that the relevant rules are satisfied. You can fine-tune the code analysis policy to check many different rules. For example, you can check rules governing design, interoperability, maintainability, mobility, naming conventions, reliability, and more.

To enforce a code analysis check-in policy for a team project
  1. In Team Explorer, right-click your team project, point to Team Project Settings, and then click Source Control.
  2. Click the Check-in Policy tab and then click Add.
  3. In the Add Check-in Policy dialog box, select Code Analysis and then click OK.
  4. In the Code Analysis Policy Editor, select either Enforce C/C++ Code Analysis (/analyze) or Enforce Code Analysis For Managed Code. Select both if your project contains a combination of managed and unmanaged code.
  5. If you select manage code analysis, configure your required rule settings for managed code analysis based on your required coding standards. This determines precisely which rules are enforced.

You can also create a custom check-in policy to perform checks that are not available by default. For example, you can disallow code patterns such as banned API calls, or you can write a policy to enforce your team’s specific coding style guidelines, such as where braces should be positioned within your source code.

Additional Resources

Project Management

  • How to use Microsoft Project to manage your project
  • How to use Microsoft Excel to manage your project
  • How to create a minimal process template
  • How to customize a process template
  • How to customize a work item type within a process template
  • How to customize a work item type within an existing team project
  • How to create an iteration
  • How to create an area
  • How to add a check-in event notification
  • How to set up a report dashboard
  • How to create folders in your source control repository
  • How to delete a project from Team Foundation Server

How to Use Microsoft Project to Manage Your Project

Use Microsoft Office Project to create and schedule tasks, lay out task dependencies, load-balance resources, and estimate end dates. You can use these features to track your projects.

To track a project, you need to perform the following high-level steps:
  • Create a project plan.
  • Create a set of tasks, schedule them, and publish them to Team Foundation Server.
    • The tasks show up in the appropriate developer’s work item queue.
    • The team members work on their tasks and report their progress in Team Explorer by setting the work item status.
  • Refresh the project plan to retrieve the latest information. This enables you to track the progress of the project in Microsoft Project.

To publish a project plan to TFS
  1. If you are creating a new project plan, set up your tasks, durations, resource assignments, dependencies, and other details as you would normally do with Microsoft Office Project.
  2. In Microsoft Office Project, on the Team menu, click Choose Team Project.
  3. Select the Team Foundation Server for your team project.
  4. Select your team project.
  5. Click OK.
  6. In the Work Item Type column, set the work item type for each work item that you want published to TFS.
  7. In the Sync column, for summary tasks that you do not want to publish to TFS, select Do Not Publish.
  8. If you have any tasks that are assigned to more than one resource, divide them into separate tasks that can be assigned to one resource. (Team Foundation Server does not currently support assigning a work item to multiple resources.) Optionally, you can group the separate tasks into a summary task to receive the automatic calculation benefits. To group sets of tasks, create a set of areas in TFS, and then group tasks by setting the Area column. TFS, see “How to: Modify the Team Project Areas” at http://msdn2.microsoft.com/en-us/library/ms181479(VS.80).aspx
  9. On the Work Item toolbar, select Publish to publish the project plan to TFS.

Additional Resources

How to Use Microsoft Excel to Manage Your Project

Use Microsoft Office Excel® to store, sort, filter, and manage requirements, scenarios, issues, bugs, risks, and work items.

There are two ways to create a work item list. With the first approach, from Team Explorer you can select a work item query and create a new data-bound spreadsheet. The new spreadsheet contains a work item list that is populated with the data from the query. You can also create a work item list from within Excel by using the add-in to select a project and import work items.

To create a work item list with Excel
  1. In Microsoft Office Excel, on the Team menu, click New List.
  2. Under Connect to a Team Foundation Server, select the server to connect to, or click Servers to enter the server information.
  3. Under Team Projects, select the team project on the TFS server with which you want to work. The document is bound to this team project.
  4. Click OK.
  5. Select the type of list you want. To create a query list, select the Query List option and then click a team query from the Select a Query drop-down list.
  6. Select the columns you want to appear in the new work item list.
  7. Import the desired work items. For more information, see “How to: Import Work Items in Microsoft Excel or Microsoft Project” at http://msdn2.microsoft.com/en-us/library/ms181676(VS.80).aspx
  8. You should now either save the spreadsheet, or publish the new work items to the work item database by clicking Publish Changes on the Team menu.

Additional Resources

How to Create a Minimal Process Template

If you do not require support for any project management–related features of TFS beyond source control, a minimal process template may be sufficient for your needs. In order to create a minimal process template, you use the Process Template Manager to download the template to your local computer, edit the template to remove the sections you are not going to use, and then upload the template back to the server.

To create a custom project template that supports only source control
  1. In Team Explorer, right-click the server name, click Team Foundation Server Settings, and then click Process Template Manager.
  2. Choose the template you want to edit and then select Download.
  3. From the folder where you saved the template, open Process Template.xml for editing.
  4. Change the name of the process to a name of your choice by editing the <name> element.
  5. In the <plugins> section, remove the plug-ins for Reporting, Portal, and WorkItemTracking.
  6. In the <groups> section, remove the groups for Reporting, Portal, and WorkItemTracking.
  7. In the VersionControl group, find the <dependencies> section and then remove the WorkItemTracking dependency.
  8. In the folder where the template was saved, remove the Reports, Windows Sharepoint Services, and WorkItem Tracking folders.
  9. Save all of your changes.
  10. In Team Explorer, right-click the server name, click Team Foundation Server Settings, and then click Process Template Manager.
  11. Select Upload and choose the template you want to upload.

After you have uploaded the modified process template, you can create new team projects by using this template.

Additional Resources

  • For more information, see “Chapter 13 – Process Templates Explained” in this guide.
  • For more information, see “How To – Customize a Process Template in Visual Studio Team Foundation Serve” in this guide.
  • For more information, see “Customizing Process Templates” at http://msdn2.microsoft.com/en-us/library/ms243782(VS.80).aspx

How to Customize a Process Template

Customize a process template to change the default work item types, security settings, source control settings, and reports that are set up when a new team project is created to match your organization’s process requirements.

To customize a process template
  1. Review the out-of-box process templates and choose the one that most closely suits your organizational process.
  2. Download the chosen process template.
  3. Customize the process template and change the work item types, security settings, and source control settings as appropriate.
  4. Upload the customized template to TFS.
  5. Verify that the changes you made suit your process requirements.

To implement the proceeding process you have two options:
  • Manually customize the XML files. Although this is manual process and hence is error-prone, it does enable you to customize the process template with a fine degree of control. For more information, see “Customizing Process Templates” at http://msdn2.microsoft.com/en-us/library/ms243782(VS.80).aspx
  • Use the Process Template Editor tool available with the Microsoft Visual Studio 2005 Team Foundation Server Power Tool. The latest version of the TFS Power Tool provides a graphical tool for viewing and customizing process templates. When connected to TFS, you can use this tool to customize work item type definitions and global lists on an active project. For more information, see “How To – Customize a Process Template in Visual Studio Team Foundation Serve” in this guide.

Additional Resources

  • For more information, see “Chapter 13 – Process Templates Explained” in this guide.
  • For more information, see “How To – Customize a Process Template in Visual Studio Team Foundation Serve” in this guide.
  • For more information, see “Customizing Process Templates” at http://msdn2.microsoft.com/en-us/library/ms243782(VS.80).aspx

How to Customize a Work Item Type Within a Process Template

Use the Process Editor tool, available with the latest version of the TFS Power Tool, to customize work item types. You can download the TFS Power Tool from http://msdn2.microsoft.com/en-us/vstudio/aa718351.aspx.

To customize work item types
  1. Download the process template that most closely meets your requirements, as follows:
    1. In Visual Studio, on the Team menu, select Team Foundation Server Settings.
    2. Click Process Template Manager.
    3. In the Process Template Manager dialog box, select the process template you want to modify and then click Download.
    4. In the Download Process Template dialog box, select the folder location on your local drive where you want to save the template, and then click Save.
  2. Open the process template in the Process Editor as follows:
    1. In Visual Studio, click the Team menu.
    2. Click Process Editor, and then click Open Process Template.
    3. In the Open Process Template fileset dialog box, navigate to the downloaded process template and then click Open. The ProcessTemplate.xml file is loaded by Visual Studio.
    4. Set the Name of the methodology you are customizing.
  3. In the Process Template Explorer, click Work Item Tracking.
  4. In the right pane, click the Type Definitions tab.
  5. To create a new work item, click Add in the toolbar in the right pane.
  6. In the New Work Item Type dialog box, enter a name for the work item type and select an existing work item type from the Copy From drop-down list. The new work item type is** created and is available in the Item List on the Type Definitions tab in the right pane.
  7. To save changes, on the File menu, click Save.
  8. Optionally, add/remove attributes** or fields** to/from the new work item type or an existing work item type.
  9. On the Type Definitions tab, right-click the work item type you want to edit, and then click Open. The selected work item type opens in a new Visual Studio window.
  10. Add or remove attributes as necessary.

Additional Resources

  • To download the TFS Power Tool, go to http://msdn2.microsoft.com/en-us/vstudio/aa718351.aspx
  • For more information about work items, see “Chapter 12 – Work Items Explained” in this guide.
  • For more information on using the Process Editor tool to customize work item types, see “How To – Customize a Process Template in Visual Studio Team Foundation Server” in this guide.

How to Customize a Work Item Type Within an Existing Team Project

You have two options for editing an existing work item type: you can use the command line or you can use the Process Template Editor tool, available as part of the TFS Power Tool.

To edit a work item type from the command line, use the witexport and witimport tools available at, “%programfiles%\Program Files\Microsoft Visual Studio 8\Common7\IDE” on a computer with Team Explorer installed.

To export the work item type from the project, edit it, and re-import the type
  • Run witexport as follows to export the work item type:

witexport /f task.xml /t http://TFSServer:8080 /p MyTeamProject /n Task
  • Edit the work item type definition.
  • Run witimport as follows to import the changed type:

witimport /f task.xml /t http://TFSServer:8080 /p MyTeamProject

The preceding command line shows how to export the Task work item type from the MyTeamProject project to a server named TFSServer.

To edit a work item type by using the Process Template Editor tool:
  1. Export the work item type you want to edit as follows:
    1. In Visual Studio, on the Team menu, select Process Editor and then click Work Item Types and then select Export WIT.
    2. In the Connect to Team Foundation Server dialog box, enter the URL of your server.
    3. In the Select Work Item Type dialog box, choose the work item type you want to export.
    4. Save the work item type.
    5. Save any global lists you also want to edit.
    6. Edit the work item type and then save your edits.
  2. Import the edited work item type as follows:
  3. In Visual Studio, on the Team menu, select Process Editor and then click* Work Item Types* and then select Import WIT.
  4. In the Connect to Team Foundation Server dialog box, enter the URL of your server.
  5. In the Import Work Item Type dialog box, browse to the edited work item type and then choose the team project into which you want to import the changed work item type.
  6. Click OK to import the new work item type definition.

Additional Resources

How to Create an Iteration

Iterations are used to group work items and therefore impact work item creation, work item queries, and reporting.

To create an iteration
  1. In Team Explorer, click your team project.
  2. On the Team menu, point to Team Project Settings and then click Areas and Iterations.
  3. In the Areas and Iterations dialog box, click the Iteration tab.
  4. Click the Add a child node toolbar button.
  5. Right-click the new node, click Rename, and then type iteration name.
  6. Click the Iteration node.
  7. Repeat steps 2, 3, and 4 to create additional iterations identified for your project.
  8. Click Close.

Note: The Microsoft Solution Framework (MSF) for Agile Software Development (MS Agile) process template includes three predefined iterations. You can delete these iterations, rename them instead of creating new ones, or simply leave them unchanged.

Additional Resources

How to Create an Area

Create areas to organize team project work into project sub-areas. For example, you could organize your project work into areas such as UI, Application, and Database. Once you have created areas, you can assign scenarios and work items to these areas.

You can start with a single root-level area and then later, as your project matures, you can create areas whenever you need them.

To create areas for your project
  1. In Team Explorer, click your team project.
  2. On the Team menu, point to Team Project Settings, and then click Areas and Iterations.
  3. In the Areas and Iterations dialog box, click the Area tab.
  4. Click the Add a child node toolbar button.
  5. Right-click the new node, click Rename, and then type the area name you want.
  6. Click the Area node.
  7. Repeat steps 2, 3, and 4 to create additional areas. In this way, you can create a hierarchy for your project structure.

Additional Resources

How to Add a Check-in Event Notification

Use the bissubscribe tool, available at %programfiles%\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\BisSubscribe.exe, on your TFS server to subscribe to check-in notifications.

To set up a check-in event notification
  • Open a command prompt and change to the following location:
C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\
  • If you want to set up an e-mail notification, use the following command:

bissubscribe /eventType CheckinEvent /address someone@domain.com /deliveryType EmailHtml /domain http://TFSRTM:8080
  • If you want to set up a Web service notification, use the following command:

bissubscribe /eventType CheckinEvent /address http://TFSRTM:8080/ci/notify.asmx /deliveryType Soap /domain http://TFSRTM:8080
  • If you get any errors or you want to confirm that you have registered correctly, do the following:
    • Open SQL Server Management Studio.
    • Open the tfsIntegration database.
    • Review the tbl_subscription table.

The* tbl_subscription* table lists all the events that are already subscribed. By viewing this table, you should be able to find the entry for the event to which you subscribed. You can unsubscribe any registered event by deleting the entry from the table. You can also unsubscribe an event by running bissubscribe, passing it the /unsubscribe command line parameter and the id of the event as follows:

bissubscribe /delete/id *[id]* /server http://TFSRTM:8080

Additional Resources

How to Set Up a Report Dashboard

Modify the team project portal Microsoft Office SharePoint® site in order to create a report dashboard that can provide a variety of project information in one location.

For example, a useful reporting dashboard might contain the following reports:
  • Remaining Work
  • Quality Indicators
  • Bug Rates
  • Project Velocity

You can add new reports to your SharePoint portal page by adding a Report Viewer Web Part for each report you want displayed on the page.

To modify the team project portal and create a reporting dashboard
  1. Install the Report Viewer Web part on your report server by using the stsadm.exe tool and RSWebParts.cab, included with the Microsoft Office SharePoint and Report Services installation package.
    1. STSADM.EXE can be found in the following path: C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN
    2. RSWebParts.Cab can be found in the following path: C:\ Program Files\Microsoft SQL Server\90\Tools\Reporting Services\SharePoint
    3. Example: STSADM.EXE -o addwppack -filename "C:\ Program Files\Microsoft SQL Server\90\Tools\Reporting Services\SharePoint\RSWebParts.cab" -globalinstall
  2. In Team Explorer, right-click your project and then click Show Project Portal.
  3. Click Modify Shared Page, point to Browse, and then click Add Web Parts.
  4. Click Virtual Server Gallery.
  5. From the Web Part List, select Report Viewer.
  6. Click Add.
  7. Enter the Report Manager name, such as http://<report server>/reports.
  8. Enter the path for the report you want to display, such as <my project>/Quality Indicators.

Additional Resources

How to Create Folders in Your Source Control Repository

You can create folders in your source control repository by using Team Explorer, or you can create the folder structure in your workspace on the client and then check in pending changes.

To create a folder structure on the server
  1. In Team Explorer, expand your team project.
  2. Double-click Source Control beneath your team project.
  3. In Source Control Explorer, select the root node, right-click in the Local Path: pane, and then click New Folder.
  4. Type the name of the root folder and then press ENTER.
  5. Repeat steps 3 and 4 and create the required folders in the source control repository.

To create a folder structure on the client
  1. Create a workspace mapping on your local computer.
  2. Create the folder structure as required by your project.

When you check in pending changes for the first time, the folder structure is copied to the server.

Additional Resources

How to Delete a Project from Team Foundation Server

You cannot delete a project by using Team Explorer. Instead, you must use the TfsDeleteProject command-line tool. You can find this tool in Program Files\Microsoft Visual Studio 8\Common7\IDE on a computer with Team Explorer installed.

To delete a project from Team TFS
  • Open a command prompt and switch to the following location:
C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\
  • Run TfsDeleteProject as follows to delete the project:

TfsDeleteProject /server:TfsServer TeamProjectName

Additional Resources

Team Foundation Project Management Resources

Last edited Aug 6, 2007 at 5:31 PM by mycodeplexuser, version 2

Comments

No comments yet.