a·gen·tic a·gil·i·ty

Creating a Work Item with defaults in Team Foundation Server

Learn how to pre-populate Team Foundation Server work items with default values using template URLs, making it easier for users to create consistent, guided entries.

Published on
2 minute read
Image
https://nkdagility.com/resources/v1HLcU8PfsS
Subscribe

In some cases you want to be creating a Work Item with defaults in Team Foundation Server so that you can give access to users but also give them guidance on what to fill out.

The best option for this is to create your own UI that leverages the TFS API and gives the users access to only the fields that you deme pertinent. This would be the full control option. If however you don’t have time or want to do that there is a simple solution. You can create a ‘template URL’ that pre-populated the field values of a Work Item.

Creating a Work Item with defaults in Team Foundation Server

Figure: New PBI form with defaults

To do this you need to open your Team Project in the Web Access and click to create a new Work Item for whatever type that you want. In this case it is the Product Backlog Item. I have then gone ahead and changed the Area Path, Iteration Path and added a value for Business Value.

Creating a Work Item with defaults in Team Foundation Server

Figure: Copy template to clipboard

Now that we have the customisations how we like we can click the “Copy template URL” button and it will create a URL with the field data on it and save it to your clipboard.

http://kraken:8080/tfs/Tfs01/TeamsWithAreas/_workItems/create/Product%20Backlog%20Item?%5BMicrosoft.VSTS.Common.BusinessValue%5D=56&%5BSystem.AreaPath%5D=TeamsWithAreas%5CTeam+A&%5BSystem.IterationPath%5D=TeamsWithAreas%5CRelease+1%5CSprint+3

You you look closely at the URL you will see that it has the field name “Microsoft.VSTS.Common.BusinessValue” followed by the value of “56” pre filled out in the URL.

Creating a Work Item with defaults in Team Foundation Server

Figure: New PBI form with custom defaults

If you drop that URL into a browser you will see the new work item page with your work item pre-populated. Now if you want you can now create a simple html page that has a list of predefined links to create work items of different types and defaults…

Simples…

Subscribe

Related Blog

No related videos found.

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Milliman Logo

Milliman

Graham & Brown Logo

Graham & Brown

Kongsberg Maritime Logo

Kongsberg Maritime

Slaughter and May Logo

Slaughter and May

Lean SA Logo

Lean SA

Ericson Logo

Ericson

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

Schlumberger Logo

Schlumberger

Lockheed Martin Logo

Lockheed Martin

Higher Education Statistics Agency Logo

Higher Education Statistics Agency

Alignment Healthcare Logo

Alignment Healthcare

Boxit Document Solutions Logo

Boxit Document Solutions

Workday Logo

Workday

Big Data for Humans Logo

Big Data for Humans

Capita Secure Information Solutions Ltd Logo

Capita Secure Information Solutions Ltd

Healthgrades Logo

Healthgrades

Royal Air Force Logo

Royal Air Force

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Washington Department of Transport Logo

Washington Department of Transport

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Ghana Police Service Logo

Ghana Police Service

Big Data for Humans Logo

Big Data for Humans

Lockheed Martin Logo

Lockheed Martin

YearUp.org Logo

YearUp.org

Schlumberger Logo

Schlumberger

DFDS Logo

DFDS

Capita Secure Information Solutions Ltd Logo

Capita Secure Information Solutions Ltd