I have a task to create reports about various work items from a Team Foundation Server 2010 instance. They are looking for more information than the query tools seem to expose which is why I am not using the OOB reporting capabilities. The documentation on creating custom reports against TFS identify the Tfs_Analysis cube and the Tfs_Warehouse database as the intended sources for reporting.
They have created a custom work item, "Deployment Requests", to track requests for code migrations. This work item has custom urgency levels (critical, medium, low).
According to Manually Process the Data Warehouse and Analysis Services Cube for Team Foundation Server, every two minutes my ODS (Tfs_DefaultCollection) should sync with the Tfs_Warehouse and every 2 hours it hits the Tfs_Analysis cube. The basic work items correctly show up in my Tfs_Warehouse except not all of the data makes it over, in particular, the urgency isn't getting migrated.
As a concrete example, work item 19301 was a deployment request. This is what they can see using the native query tool from the web front-end.
I can find it in the Tfs_DefaultCollection and the "Urgency" is mapped to Fld10176.
SELECT
Fld10176 AS Urgency
, *
FROM Tfs_DefaultCollection.dbo.WorkItemsAre
WHERE ID = 19301
trimmed results...
Urgency Not A Field Changed Date
1 - Critical - (Right Away) 58 2011-09-07 15:52:29.613
If I query the warehouse, I see the deployment request and the "standard" data (people, time, area, etc)
SELECT
DWI.System_WorkItemType
, DWI.Microsoft_VSTS_Common_Priority
, DWI.Microsoft_VSTS_Common_Severity
, *
FROM
Tfw_Warehouse.dbo.DimWorkItem DWI
WHERE
DWI.System_Id = 19301
Trimmed results
System_WorkItemType Microsoft_VSTS_Common_Priority Microsoft_VSTS_Common_Severity
Deployment Request NULL NULL
I am not the TFS admin (first exposure to TFS is at this new gig) and thus far, they've been rather ...unhelpful.
Is there be a way to map that custom field over to an existing field in the Tfs_Warehouse? (Backfilling legacy values would be great but fixing current/future is all I need)
Is there a different approach I should be using?
Did you mark the field as reportable? See http://msdn.microsoft.com/en-us/library/ee921481.aspx for more information about this topic.
Based on Ewald Hofman's link, I ran
C:\Program Files\Microsoft Visual Studio 10.0\VC>witadmin listfields /collection:http://SomeServer/tfs > \tmp\witadmin.txt
and discovered a host of things not configured
Reportable As: None
At this point, I punted the ticket to the TFS admins and indicated they needed to fix things. In particular, examine these two fields
Field: Application.Changes
Name: ApplicationChanges
Type: PlainText
Use: Project1, Project2
Indexed: False
Reportable As: None
or
Field: Microsoft.VSTS.Common.ApplicationChanges
Name: Application Changes
Type: Html
Use: Project1, Project2
Indexed: False
Reportable As: None
It will be a while before the TFS Admins do anything but I'm happy to accept Edwald's answer.
Related
We've just upgraded from TFS 2015.2 to TFS 2017.3 and we're running in to an issue when creating new team projects.
For some reason, we're getting the following error in the error log when we try to create a new team project:
[09:54:24.797] Importing work item types
[09:54:25.663] [Error] TF400930: The reporting attribute for field Microsoft.VSTS.Common.StateChangeDate is inconsistent between the imported XML and what is currently configured for the field. Correct the field configuration in the XML and try again.
[09:54:25.667] Microsoft.TeamFoundation.WorkItemTracking.Server.LegacyValidationException: TF400930: The reporting attribute for field Microsoft.VSTS.Common.StateChangeDate is inconsistent between the imported XML and what is currently configured for the field. Correct the field configuration in the XML and try again.
[09:54:25.667] at Microsoft.TeamFoundation.WorkItemTracking.Server.ServerMetadataProvisioningHelper.ThrowValidationException(String message)
[09:54:25.667] at Microsoft.TeamFoundation.WorkItemTracking.Common.Provision.UpdatePackageField.CheckDefinitionConsistency(XmlElement fieldElement)
[09:54:25.667] at Microsoft.TeamFoundation.WorkItemTracking.Common.Provision.UpdatePackageField.Update(XmlElement fieldElement)
Here is the result from witadmin:
Field: Microsoft.VSTS.Common.StateChangeDate
Name: State Change Date
Type: DateTime
Use: --- (Bug, Shared Steps, Task, Test Case, User Story, Issue, Change Request)
Indexed: False
Reportable As: dimension
And from a search with Notepad++:
Notepad++ Search for Microsoft.VSTS.Common.StateChangeDate
As you can see from the search, it is being "reportable" as a dimension, which is what witadmin is saying the current attribute is.
Any idea on what we're doing wrong?
Thanks!
I checked on my side, by default the reportable attributes are not set in the Workitem definition files (.xml files).
So, please try to remove the attribute reportable = "dimension" from all the Wits. Then import the Wits and try it again.
If that still not work, you can try removing the Microsoft.VSTS.Common.StateChangeDatedefinition from these work items, it's a standard field which will be added to all your work item types automatically.
Reference this similar thread : Tfs project creation results in error: TF400930: Field 'System.ExternalLinkCount' is defined multiple times
I have recently upgraded an on-premises Team Foundation Server from Tfs 2015 to Tfs2015.Update3 (14.102.25423.0)
The upgrade was completed and all other functionality seems to work as usual.
A day or so ago I attempted to create a new Tfs project (TFVC) and that resulted in an error.
When I look at the application tier log files, I see the following:
[10:31:30.153] Executing step: Create the Team Project.
[10:31:30.167] Executing step: 'Create the Team Project.' WorkItemTracking.CreateTeamProject (4 of 13)
[10:31:30.183] Getting process template.
[10:31:31.463] Refreshing server caches.
[10:31:31.463] Importing work item link types.
[10:31:32.180] Importing work item types
[10:31:33.727] Importing work item types
[10:31:34.413] [Error] TF400930: Field 'System.ExternalLinkCount' is defined multiple times with different field definitions. Correct the field definition and try again.
[10:31:34.507] Microsoft.TeamFoundation.WorkItemTracking.Server.LegacyValidationException: TF400930: Field 'System.ExternalLinkCount' is defined multiple times with different field definitions. Correct the field definition and try again.
[10:31:34.507] at Microsoft.TeamFoundation.WorkItemTracking.Server.ProvisioningService.InternalImportWorkItemTypesOrGlobalWorkflows(IVssRequestContext requestContext, Int32 projectId, String methodologyName, IEnumerable`1 typeElements, ProvisioningActionType actionType, InternalSchemaType schemaType, Boolean overwrite, ProvisioningImportEventsCallback importEventCallback)
We are unfortunately making use of a customized template (which is based on the Scrum template) and it is exactly this template that causes the error.
When creating a new Tfs project (TFVC) based on the standard Scrum or Agile templates it works fine.
I downloaded the customized scrum template in question and did a grep search on “System.ExternalLinkCount”.
When I look at the fields they do seem to be of the same type.
Any ideas or suggestion why it is acting up in this way?
You can just remove the field definition from these work items, it's a standard field which will be added to all your work item types automatically.
I have two Team Project Collections -- DefaultCollection and ArchiveCollection. I need to update the display name for System.ExternalLinkCount from 'ExternalLinkCount' to 'External Link Count'.
This is the command I'm using to accomplish that on both collections:
witadmin changefield /collection:http://localhost:8080/tfs/<CollectionName> /n:System.ExternalLinkCount /name:"External Link Count"
I get no errors from the command and it tells me that the field is updated. However, after I process the Tfs Warehouse, I see a schema conflict on the field. The DefaultCollection has the updated name, but the ArchiveCollection still has the old name.
That's the part I don't understand. The update is getting made to the same field in both collections, but it isn't updating in the ArchiveCollection.
Not sure what I'm missing.
I have been setting up builds for quite some time now. To do this, I use the scripts Microsoft provided for AX 2012 (Build and deploy scripts for Microsoft Dynamics AX 2012)
There were some tweaks to be done in the scripts to get TFS working the way it should and it also involved some extra actions because we have code in the startupPost (fe precompilation with message window instead of compiler output form due to modification in the sysSetupFormRun class)
But what is haunting me for some weeks now is the XPO import. The provided script uses the latest CombineXPO tool to combine all of the XPO files that were fetched from TFS into one big XPO. Once that is done, the XPO is imported in Ax.
And the real problem here is that I do not trust the XPO import because we have frequently been seeing huge amounts of errors like :
Compiler ERROR: \Data Dictionary\Tables\EPSICParameters\EPSICParameters : Relation Currency is incomplete due to missing fields
And indeed the fields aren't there in Ax, but when I look in the XPO that was supposed to be imported,the relation fields are present which indicated that the sources were fetched fine from TFS.
REFERENCE #Currency
PROPERTIES
Name #Currency
Table #Currency
RelatedTableCardinality #ZeroOne
Cardinality #ZeroMore
RelationshipType #Association
UseDefaultRoleNames #Yes
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE PKFK
PROPERTIES
Field #CurrencyCode
RelatedField #CurrencyCode
SourceEDT #CurrencyCode
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
Anyone who could help me out here? This thing is really blocking our automated builds with Ax because we simply cannot tell when the next build is going to run fine :s
I had this error as well. I believe that the root cause of this is due to the relation being auto created when you drag and drop an EDT onto a table to create a field, and then a rename of that field breaking the table relation. However, the EDT relation will still work on the field and the front end/GUI will not break. For example, dragging the HcmApprover EDT onto a table will prompt you to ask if you want to add the ForeignKey relation from the EDT to the current table? If you say yes, and then rename the field from HcmApprover to something else, the table relation will break. However, the front end will appear to work correctly (you will likely still be able to see a working dropdown to view hired workers from the HCM module).
I'm not positive, but I think the GUI still works because of the EDT relations on the field itself causing the front end to still operate correctly.
Either way, if you drag and drop EDTs (this goes for more than just EDTs) to create fields and do any renaming, make sure that the appropriate auto/framework-generated "stuff" is also renamed manually (ie by you).
Try doing the import twice, ignore any errors from the first run.
We are currently using Scrum 2.0 process template from microsoft in new TFS 2012, however we don't use hours as task estimates, we simply count tasks. This is easily archieved by setting each task value as 1 as default and set that field read only in task property form.
However original template uses hours as unit with tasks, so there are are mark "h" all around template. Is there way to get rid of this hour mark since it causes constant confusion? Especially in management.
You can configure how the remaining work is displayed, by modifying the format attribute in the following row in the commonconfiguration.xml file:
<TypeField refname="Microsoft.VSTS.Scheduling.RemainingWork" type="RemainingWork" format="{0} h" />
By default this attribute is "{0} h", so you can simply set it to "{0}" to fit your needs.
You can download the commonconfiguration.xml file from the server, using the witadmin command:
witadmin exportcommonprocessconfig /collection:http:<your collection> /p:<your project> /f:<the file name>
After editing the file you must import it back into TFS using witadmin command:
witadmin importcommonprocessconfig ...the same parameters as above
Note: with the RC it looks like you must leave a space after the placeholder, like "{0} ", otherwise you will get a validation error, when importing the file. I haven't tried yet with the RTM to see if this has been fixed.
As far as I can tell, all of those h's are hardcoded straight into web access. So the only way to remove them would be to find them (I used Chrome's dev tools), isolate them, and then go into the Web Access pages located on your TFS Server (application tier) and manually remove them. This is because they aren't actually part of any template, so there isn't a way to remove them all at once. The path to the files will be something like
c:\Program Files\Microsoft Team Foundation Server 11.0\Application Tier\Web Services
Good luck, I've had a heck of a time trying to alter them.
You can use TFPT or the WITADMIN command line tool to remove the remaining effort field.
I would suggest however not to remove it, but rather to remove it from the form itself (so that it just doesn't show), and add a rule so that it defaults to 1 and is read-only. Furthermore, in the workflow, add a rule that changes the value to 0 when you reach done.
Since there's no actual meaning to the number itself, the units can be actual hours, ideal hours, story points or whatever you want them to mean. By making each task 1 or 0 (when done), you can make use of TFS' built in tools such as the burndown reports to track your progress. Each task done will reduce the remaining work, and you will be able to keep track of velocity by summing up the effort completed in each iteration (which is the same as counting).