TFS Prevent two people from editing the same bug - tfs

I am working on an evaluation of TFS 2013, specifically for bug tracking. We are already using it for source control. The question that has been asked, is regarding the "locking" of bug records in TFS. Our folks have demonstrated that they can get into a state where if using the web client, and Visual Studio, they are able to both edit the same bug.
Is there a way to limit this interaction so that only one person can edit that item? I know other bug tracking software already does this. I am hoping that this is a misconfiguration in the proto environment that they have built.

To avoid multiple modification on a work item at the same time, you can customize the "Changed By" Field definition to prevent others to modify this field once it has a value:
<FieldDefinition name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true" reportable="dimension">
<COPY from="currentuser" />
<FROZEN />
</FieldDefinition>
Check: https://msdn.microsoft.com/en-us/library/ms404857.aspx

Related

TFS shows old cached team members in "Assigned To" field

I'm using TFS 2013 and the process editor templates. I am trying to add an "allowed values" rule for the "Assigned To" standard field so I entered "[Project]\Some TFS Team" in the the ListItem popup hopping that only members from this team will appear in the dropdownlist suggested values of this field.
Unfortunately the list showed old team members of this team and no matter I added or removed members to and from this team the dropdownlist keeps showing only the old data.
Here are the steps I tried to clear that cache:
1-restart everything (TFS, my machine, TFS server)
2-remove and re-add the rule
3-run witadmin rebuildcache from my machine
4-delete C:\Users\ ...\AppData\Local\Microsoft\Team Foundation\5.0\Cache folder
What else should I look for to make the TFS responsive?
Note:
The same old list also appears in the field in the TFS web access.
You need to remove the default ALLOWEXISTINGVALUE and VALIDUSER rule.
Just change the Assigned to filed context as below:
<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="[Project]\Team0720" />
</ALLOWEDVALUES>
</FIELD>
Update:
Please try below items to narrow down the issue:
TFS doesn’t reflect changes in the AD immediately, you can try to
force sync the changes, See Neno’s blog post on the issue with a
tool TfsSyncIdentities.exe as solutions. And this article to synchronize TFS users with AD for your reference.
Try to create a new team, then add several
members to the team, then check the rule with this new team.
Have a check for other work item types, whether they have the same issue.
Have a check for another team project, to check if it works.
#Andy-MSFT it looked like it took years from me to figure out what was the issue- maybe because I didn't logged into the TFS server itself -as I ran TfsSyncIdentities.exe tool to enforce the AD sync then run it again with /status option to check I found that it didn't run , only then I know that the Job agent service is stopped!!, and just after I restarted it everything worked as dreams and TFS responding to all the changes
note:
I had to stop it again because the TFS became toooooo slow when the job agent was running
Thanks Andy for you help and support

TFS 2017 Work Item Forms (new) - conversion from TFVC, now missing Development section on form

Running on TFS 2017, recently upgraded from 2015.
Soon after the upgrade I started to convert my existing TFVC repositories to Git. So far all is going well on that side, however what's puzzled me now is that the Work Item Task form seems to be incorrect\based upon TFVC.
I am using the new forms that come with 2017 and a Playground collection I also have displays the correct form.
The attach screen shots will probably explain it a lot better than words:
I don't want this:
This is what I'm expecting:
As you can see, the first one is missing the Development Group shown in the second, that makes creating Pull requests etc so much easier.
So, what am I missing here?
I should add that the Playground was created on TFS 2017, the other collection with the missing Development header was from a 2015 instance. I'm assuming there's some sort of setting somewhere that might need to be changed - either on the GUI or witadmin. Either that or this just isn't possible and I'm basically stuck. If it is witadmin then I'd appreciate more than a reply telling me it is since that command confuses the heebies out of me.
Actually the missing group on the work item form has nothing to do with moving from TFVC to Git.
It's caused by the automatic conversion of the old work item form to the new web layout style.
Unfortunately the TFS Power Tools template editor doesn't support the new layout, yet. So you need to edit the process template XML files by hand.
First thing you have to do, is to export your work item type configuration using the witadmin.exe tool as described here: Import, export, and manage work item types
In the file go to the <WebLayout> section. Just for the missing development group add the following to the last <Section> element:
<Group Label="Development">
<Control Type="LinksControl" Name="Development">
<LinksControlOptions ViewMode="Dynamic" ZeroDataExperience="Development" ShowCallToAction="true">
<ListViewOptions GroupLinks="false"></ListViewOptions>
<LinkFilters>
<ExternalLinkFilter Type="Build" />
<ExternalLinkFilter Type="Pull Request" />
<ExternalLinkFilter Type="Branch" />
<ExternalLinkFilter Type="Fixed in Commit" />
<ExternalLinkFilter Type="Fixed in Changeset" />
<ExternalLinkFilter Type="Source Code File" />
</LinkFilters>
</LinksControlOptions>
</Control>
</Group>
From my experience this is not the only thing that's missing on the form. To get the same look as in the newly created (on TFS 2017) project, I exported the standard process template my process template is based on (e.g. Scrum, HowTo) and copied the whole <WebLayout> element to my Task.xml. Afterwards I added my customizations and uploaded the WITD to the project.
You can try to create a new team project collection in TFS 2017 and create a new Git team project, then migrate the TFVC repositories to the new created Git team project. Then you'll be able to use the new form on TFS web access.

How to add columns in sprint board TFS (not backlog board)

In the newer versions I can customize the product backlog board by adding columns and set states. I want to do the same in the sprint board but I can't find that functionality. I've change the way you can work with Bugs but it still don't give me the options I want.
Pls Help
Not possible for Visual Studio Team Services(VSO) but for on-premise it is and is the same process since at least TFS 2012.
You will need to alter your process template for the Team Project to include the additional states. You can do this with either TFS Power Tools or I prefer to do it manually. You didn't specify what Process Template you are using so here it is for the SCRUM template (Others will be the same just will contain different wordings):
Export your WITD for Tasks from your dev machine via command line (I think it needs Team Explorer):
witadmin exportwitd /collection:http://servername:8080/tfs/DefaultCollection /p:"TeamProjectName" /n:Task /f:"C:\FileToExportTo.xml"
Edit this file and find the WORKFLOW section and add in your new state into STATES e.g:
<STATE value="New State" />
Next, in the TRANSITIONS section add in the required transitions and any logic associated with it e.g:
<TRANSITION from="In Progress" to="New State">
<REASONS>
<DEFAULTREASON value="New State Started" />
</REASONS>
</TRANSITION>
Save the file and import it again:
witadmin importwitd /collection:http://servername:8080/tfs /p:"TeamProjectName" /f:"C:\FileToExportTo.xml"
You should export your entire process template and you should add those files to source control. If you want to do the same for Bugs or any other work item type then you will need to export and modify those WITD's too.

Upgraded team project: adding Epic work item type

I have a TFS2015 server upgraded from TFS2013.5.
The existing team projects were created using the old template MSF For Agile 2013.x.
For these team projects I would like to enable also the Epic work item type.
According with http://blogs.msdn.com/b/tfssetup/archive/2015/09/16/configuring-the-epics-for-upgraded-team-projects-in-team-foundation-server-tfs-2015.aspx I should download the latest Agile template and import the Epic work item type.
The import of Epic type is failling with the below message:
Error importing work item type definition:
The 'refname' attribute is not declared.
So I created a new team project using the Agile template, exported the Epic work item type and compared with Epic work item type resulted from the download operation.
It seems that the differences between these two types are quite notable:
<WORKITEMTYPE name="Epic">
vs
<WORKITEMTYPE name="Epic" refname="Microsoft.VSTS.WorkItemTypes.Epic">
missing:
<FIELD name="Iteration ID" refname="System.IterationId" type="Integer" />
<FIELD name="External Link Count" refname="System.ExternalLinkCount" type="Integer" />
and so on.
Do you know why are those differences present?
The process template that you download from VSO is already prepared for Process Customization and contains extra information that an on-prem server doesn't understand yet.
In your case, you can simply remove the "refname=Microsoft.VSTS.WorkItemTypes.Epic" piece from the file and import it.
The fields that you list out are system fields (they start with System.*) and they will always be added to all WIT definitions. They don't have to be part of the xml file that you import.

Is there a way to customize the work item colors in TFS 2012 kanban board?

I would like to differentiate the work item types (i.e. product backlog items vs bugs) using colors or icons, to improve the board visualization.
It is possible in TFS 2013.
Open the Command Prompt
cd %programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE
witadmin exportprocessconfig /collection:your col. /p:project /f:file
Edit the exported file, see below
witadmin importprocessconfig /collection:your col. /p:project /f:file
The process config should contain a section work item colors, if the section is missing just add it (e.g. at the end just before the end of ProjectProcessConfiguration)
<WorkItemColors>
<WorkItemColor primary="FF009CCC" secondary="FFD6ECF2" name="Product Backlog Item" />
<WorkItemColor primary="FFF2CB1D" secondary="FFF6F5D2" name="Task" />
<WorkItemColor primary="FFCC293D" secondary="FFFAEAE5" name="Bug" />
</WorkItemColors>
The primary color is used in lists and the secondary color in boards.
I had the exact same problem. The last 7 months or so I have built a chrome plugin that does this (and much more) in my spare time as a project to learn Javascript and to make my daily work easier. Our team and a few more is using it since a while back with good results. Now It is available for free in Chrome Store under the name TFS Kanban buddy.
https://chrome.google.com/webstore/detail/tfs-kanban-buddy/bnkanimchogkpkjbabhoficohanbhalp
The code is available on GitHub as well if someone feels like fiddling with it.
No, there is no non-hack way to change the color of the cards. This functionality is rumored to be "on the backlog" however.

Resources