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

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

Related

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.

TFS work items for tracking tasks

I'm using Visual Studio 2012 and TFS onlin. I have created a TFS project using "MSF for CMMI" process template because it allows devs to estimate tasks, specify the remaining, etc.
Questions:
1) How can make the estimation of the work item read only? I don't want anybody to change that value once it has been set.
2) I need to create a report that shows what each dev has done each week, indicating task and hours. I tested MS Project integration with TFS and it's great but some columns like start date and end date only exists in MS Project so I need to ask each developer when they have started and finished each task manually.
3) What reports do you recommend for tracking devs and tasks?
Thanks in advance.
Answering your first question: you'll have to modify Task work item type definition in TFS:
export existing definition using witadmin.exe tool (you can find it in your Visual Studio folder):
witadmin.exe exportwitd /collection:<collection URL> /p:<project name> /n:Task /f:task.xml
Modify exported xml by adding CANNOTLOSEVALUE and FROZEN rules to the Microsoft.VSTS.Scheduling.OriginalEstimate field definition:
<FIELD name="Original Estimate" refname="Microsoft.VSTS.Scheduling.OriginalEstimate" type="Double" reportable="measure" formula="sum">
<HELPTEXT>The original estimate of work required to complete the task (in person hours)</HELPTEXT>
<CANNOTLOSEVALUE />
<FROZEN />
</FIELD>
Import the updated xml back to TFS:
witadmin.exe importwitd /collection:<collection URL> /p:<project name> /f:task.xml

TF285017: The Assigned To field cannot be blank

I'm working with TFS 2010 and Project 2010 Feature Integration pack and the Scrum for Team System v3 process template. Within the Project Server tab, I'm trying to set the default value for "Submit to Project Server" and "Enterprise Project" (which works fine), but when the Project Backlog Item is created/saved, it always fails when trying to sync with Project Server with the error message in the title of this post: TF285017: The Assigned To field cannot be blank.
I've Googled the error code, and it seems like there is no documentation for it anywhere. Can someone help?
Ultimately I fixed by adding the Assigned To field to the template and making it required. This probably isn't the best way to solve this issue, but does get around the error (and making the field required was something I was going to do anyway).
As the error states, in the TFS process template for the backlog item, the Assigned To field is mandatory. It needs to be filled before it can be synced with the other system.
You might try to remove the required flag from the Assigned To field in the workitem by using the TFS Power Tools process editor.

Resources