How to change ID? - tfs

Hallo experts,
i'm newbie to TFS, but responsible for SW Test in my group. I'm trying to create a couple of test cases thru MS Visual Studio. I don't know how to change the Test Case IDs, which seem to be automatically assigned by the system. However we want to adapt the IDs to the conventions in our SW specifications. Thanks in advance.
JohnMunich

If what you're looking for is a custom Test Case ID, you'll probably want to modify your work item template for the test cases with a new, custom field.
You can do this by exporting the appropriate work item type using the TFS Power Tools, adding the field and re-importing.
If you want the field to show up in the warehouse, be sure to make it reportable.
Note: The direct link is for the TFS 2010 power tools. This page also contains a link to the TFS 2008 Power Tools.

I don't believe there's any way to do this within TFS itself. These numbers are assigned and internally they are used as primary keys for the data.
You potentially could change the number that will be assigned. I think this might be of help.
The problem is that this will change the next User Story ID that you generate, too.

Related

Is there a way to setup custom triggers in Visual Studio Team Services/TFS?

I use VSTS/TFS for work and side projects and I wanted to setup a trigger/rule that would automatically move stories into a certain iteration when I move them from "New" to "Approved" or whatever column is associated with an active state. I know how to change the iteration manually but it would be way easier if there was a way to say something like this psuedocode:
if (workItem.State == "Active") {MoveToIterationActiveForTodaysDate();}
Ideally too, if this isn't too picky, I would like it to only run on initial move so I can reassign to a different iteration later if I wanted to.
If anyone has an easier way to do this too that accomplishes the same thing (moving items to an iteration without having to manually activate the story and move it to the desired iteration) that would work as well. I'm still figuring out the ideal way to manage VSTS/TFS. Thanks in advance
Using VSTS is able to customizable work item rules.
Whether it be automatically setting the value of certain work item
fields or defining the behavior of those fields in specific states,
project admins can now use rules to automate the behavior of work item
fields and ease the burden on their teams.
More details please refer this tutorial: Add a rule to a work item type
However, it works with fields in the work item, not able to move work item to different iteration or area directly.
There is no out of box feature could achieve your requirement with TFS and VSTS for now. You may have to customize TFS events/actions to achieve the same feature as right click the work item--select move iteration--choose iteration.
Moreover, you could also use some 3-rd party extensions/tools such as Giulio
suggested TFS Aggregator.
As of today, there is no built-in automation, so the community wrote some tools that react at TFS/VSTS events and run scripts.
I can suggest TFS Aggregator which is used by many organization throughout the world: I am one of the core contributor.

TFS2013 Web Access - Configuration for Stakeholders

We use TFS2013 on premise. A request came up that when using Web Access, some members with Stakeholder access should only have limited rights when opening work items.
They should be able to edit Description, Acceptance Criteria, etc fields, but others should be read-only, such as Iteration, State, etc.
The only option I saw was about tags Create tag definition option under
Security >> Permissions, but that's not enough for me.
One idea was Customizing a process template, but this seems to be thin ice as our team doesn't have any experience with it and the things to avoid list is quite long.
The best workaround approach so far is to reference the TFS ClientLibrary from Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ReferenceAssemblies\v2.0\ and create a custom website which implements only the required features (for example when opening a work item, State would be a Label instead of a DropDownList).
The drawback of this solution is that it would keep the whole WebAccess portal hidden, including its nice features.
So my question in short: is there a way to make certain fields read-only on the work item form for stakeholder members?
UPDATE
Eventually I went towards Template Customization using TFS Power Tools 2013. Now I have to following problem:
Applying rules for certain fields work just fine, but in case the field type is TreePath, saving the template gives the following error
TF26062: Rule '< READONLY for="[Global]\Stakeholders" />' is not
supported for the field 'System.AreaPath'.
There were validation errors. Continuing to save may cause the file to
become unloadable, do you want to continue?
According to this answer from 2009: "there are some particular fields which can't be applied rules for"
Any suggestions how to go on?
You can choose the work item types to make some fields read only.
You will never need to be careful to not mark field read only that are needed for adding items. That would include area and iteration. Use witadmin.exe to export the desired work item and add read only clauses only for those in the stakeholder group.
You would be better with a permissive model. Allow everything and tell them what bout to change. Then have an alert for changes to those fields by stakeholders.

How to import legacy requirement IDs into TFS 2013?

I am trying to import some existing requirements into TFS 2013 (currently just maintained in a Word doc). However, I need to preserve the existing, pre-assigned requirement IDs (for tracking against existing test cases outside of TFS, etc.). I've come up with multiple ways of doing it:
Keep it as part of the requirement title
Add it to the description for the requirement
Add a tag with the legacy req id to the appropriate req in TFS
Add a new field for it to the requirement template (or simply use an existing unused field)
All of these seem pretty unclean to me except the "new field" option, but I'd rather avoid changing the work item template if I could.
Are there are other/better ways to do this? Has anybody done something similar before?
I usually add a field to most of my work items called External ID that I use for this purpose. It's also useful to link TFS Work Items to say a ticket ID in a Help Desk ticketing system.

TFS 2012 hide content of work item field based on rights

is there a way to hide the content of a field based on a role?
I thought about creating a serverside plugin which empties the field if the user does not have permission to view the field and repopulate it on save. But I don't know how to do this, I did not find any event which I could use. Any idea?
My first intent was to use the EMPTY rule but this really clears the content and does not repopulate it. Also the READONLY rule is not acceptable for us. Do you have any idea?
I know this was already requested http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2088177-add-ability-to-hide-mask-fields-in-a-work-item-bas but I need the functionality now.
I also thought about creating a workitem where the hidden fields are stored in and linking it to the other work item but this is not the solution I want ...
The only way to do this is by creating a custom work item control. That control can then only display the contents of the value if the user has the correct permissions. What it does not prevent though is to see/update the data via other tools like Excel, Work Item Query or Bulk Update.
As the suggestion on User Voice suggests, it is not possible today in TFS. So please vote and make sure the Team Foundation Server team knows it is high priority for a lot of our customers.
Ewald Hofman (Program Manager, Team Foundation Server)
In VS 2013 when u use the Empty Rule, the field disappear! You can see that in Scrum Template when you change de WIT state to Done the Remaining Work field are hidden

Printing Work Items in TFS

I am looking for a fancy way the print individual work items in TFS.
OK ... maybe not the work item directly but I need to produce printable forms based on data on a work item. And by fancy I mean: header, footer, formatting, tables maybe ... stuff like that.
No, I am not trying to print a list of work items, read carefully, I need an output based on a single work item.
For those who are wondering "Why on earth do you need that?" I should say:
We are keeping everything on TFS around here. (For now only software development stuff, but I am thinking bigger...) Sometimes somethings need to be on hard copy, to be signed for instance, and that is why I need printable forms.
I came up with a solution a little interesting from my point of view.
I used the "mail merge" function of MS Word to print work items. I prepared an SQL query that reads whatever fields are needed from TFS database and set the query as a datasource for mail marge.
Now I can design a word document of any kind and use TFS fields in the document. I just select the appropriate record by work item number and voila!! my printable work item is ready.
It is a little slow when selecting a work item if you use a query that returns all work items, but who is perfect? Right ?
Though I agree that Reporting Services is probably the best way to accomplish this, you could alternatively write a web application that queries TFS and formats the data into a nice, printable HTML page. If you really wanted to, you could even look at some of the PDF libraries that are out there and just form-fill a PDF.
Here is an other free tool which can print tfs workitems:
http://blog.bbv.ch/2013/10/31/tfs-print/
You can use the Reporting services to create nice reports.
Access to the reporting services.
http://[tfsservername]/reports
Use the report designer with the standard cube's.
Here a link to get you started
ALM Rangers recently posted a tool on CodePlex which is actually an add-in for MS Word. What it does is connect to a query on TFS and create a word documents based on a print template.
http://vsarword4tfs.codeplex.com/

Resources