Creating a Task Board Template

2019-03-04 13:11发布

问题:

The basic idea is that I want to be able to say make a new contractor taskboard master template. I'll have an iteration path called Contractor Integration. Inside it would be a master template where it has 4 stories and 10 tasks per story. I would like to be able to use this template for every new person that comes through by just changing the name it is assigned to. So it would need to pretty much make a clone of the 4 stories and 10 Tasks to be assigned to a new person every time I get a new person. Do you know of any pointers where to look or start?

I've tried exporting to an Excel sheet and just just copy the tasks but the tasks don't stay linked to the stories that I copy. Any help would be appreciated, thanks! I can provide more info if it is not clear.

OH I noticed that this might be already a feature in TFS 2015 but I'm using TFS 2013.

Do you know if there is a way to automate this process? As I wish to just be able to type in the names of the new people and it should automatically assign them to the Master Task List I have.

回答1:

Manually

You can do this in Excel, but when exporting it and importing it back in you need to use a hierarchical query.

  • make sure you set the "type of query" to: Tree of workitems
  • the "type of tree" to: parent/child
  • In the top half of the query set the work item type to "User Story"
  • In the bottom half of the query set the work item type to "Task"

Now if you open this query in Excel you'll notice the little tree icon:

Then make sure you click "Choose Columns" and the click the "Add Required" button for the Task and the User Story work item type:

Make sure you set the right Iteration and Area for the work items to show up on the board.

The use the "Add Tree Level" button in Excel to add additional tree levels (they're represented as "Title 1", "Title 2", "Title 3", etc):

Then paste in your template where each child is indented one level from its parent.

When you push this back to TFS it'll result in the correct parent-child relationship.

Automate

If you want to automate this process you can use Powershell in combination with the TFS Client Object Model. It's quite straightforward to connect to TFS, use the WorkItemStore class from the Client Object Model and fully automate the creation of tasks.

A good basis can be found here, though last time I asked there was no cmdlet yet to create links between workitems:

  • https://github.com/igoravl/tfscmdlets

The Object Model code to achieve that is very straightforward and is explained here:

  • https://stackoverflow.com/a/24676843/736079


回答2:

In addition to what Jessehouwing is saying, be sure to include the fields necessary for these tasks to show up on the board in the team query you use to create your excel spreadsheet!

They'll be linked if you use the excel exportation and importation correctly, but you'll also need to make sure to include Areas and Iterations as part of the query/spreadsheet (for instance) because each board query relies on those as well.

Here's a screenshot:



标签: tfs task tfs2013