I have Azure DevOps extension which is based on typescript. My extension supports TFS 2015, 2017,2018,2019 and Azure DevOps. I am trying to get list of "Team" names, during run time to use in my extension.
I can download "Team" list using witadmin command
witadmin exportgloballist
/collection:http://localhost:8080/tfs/DefaultCollection
/f:C:\tfs\download\globallist.xml
<GLOBALLIST name="Teams">
<LISTITEM value="a" />
<LISTITEM value="b" />
<LISTITEM value="c" />
<LISTITEM value="d" />
<LISTITEM value="e" />
<LISTITEM value="f" />
<LISTITEM value="g" />
</GLOBALLIST>
I have gone through below Microsoft TFS API reference with the objective to obtain "Team" names using TFS API. Oldest API reference I found in this doc is version 4.1. I was looking for older version of API reference but it seems those details are not documented.
https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get%20all%20teams?view=vsts-rest-tfs-4.1
Provided API call in the above doc, does work fine with Azure DevOps.
However, it does not works with TFS versions. in TFS 2017 it just displays "page not found" error.
e.g.
https://testing123.visualstudio.com/_apis/teams?$mine=True&api-version=4.1-preview.2
Please be kind enough to provide some guidelines to obtain "Team" name list on TFS 2015 and other TFS versions using TFS API call.
The documentation for the older versions of the API are separated and can be a little confusing to find. They can be found at this link (which has a breadcrumb on the overview of the current API spec).
That being said, I don't think there is a documented API for the older versions that will get the teams for you like you are wanting. Inspecting the network traffic though when browsing teams, it looks like this (probably unsupported) API is available to use in TFS2015 - AzDO2019.
http://{instance}/{collection}/{project}/_api/_browse/GetTeams?__v=5
Related
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
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.
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
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.
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