Work Item Description <-> Project item Notes

Jul 27, 2007 at 4:28 PM
Hi,

I just have a suggestion for a future release. Why not link the description field of a work item with project notes? I think it's the natural thing to do.
Coordinator
Jul 30, 2007 at 7:40 PM
Sure, this is something we can do. It should be pretty easy for someone to add this to the mapping configuration though, shouldn't it?
Aug 2, 2007 at 3:31 PM
I tried to do so, but did not succeed. Would you explain how to create new mapping field in web.config, for area path and iteration path fields? I want to create new work items (with custom fields) in Process Template, so I need to know how to map those new fields. In previous version of Connector 2003, there was documentation for this feature, but right now, I cannot find any specifications.
Coordinator
Aug 3, 2007 at 2:19 PM
gzoranovic,

Yeah, I know doumentation is sorely missing. The mappings are maintained within the configuration for the Connector Web Service. You can add a fieldMapping for AreaPath by adding a new fieldMapping element and setting the tfsWorkItemField to System.AreaPath and the partnerWorkItemField to whatever field in the PS Assignments table you want to map this field to. If you want to map to a field in the TASK or AssignmentCustomField table instead, you'll need to use the PSEntityFieldMapping type instead of the regular FieldMapping type (see how System.Title is configured for an example). This will move the data as is from one system to the other. If you need to somehow transform the data as it moves back and forth, you will need to add FieldMapping rules for the FieldMapping. This is a much more advanced topic and I wouldnt do it justice here -- I plan on blogging about it very soon. However, suffice it to say that there are several FieldMappingRules that we provide for you OOB that you can use to transform the data as it moves back and forth and these rules get chained together as it moves in one direction. So you can chanin together several rules to define how data gets transformed as it move from TFS to PS2007 (the partner in this case) for example. There a plenty of examples in the OOB configuration -- check out how units of work get transformed (they need to be multiplied by 60000 going to PS and divided by 60000 coming from PS), how resource information is configured (going to PS we need to get the account name from the display name and then the resource id in PS for the account name and then reverse all this going back to TFS), etc.

Alternatively, because the engine for the Connector Service just leverages a new application block named the TFS Connector Application Block, all of this configuration data could also be viewed and modified using the Enterprise Library Configuration Tool.

HTH,
Lenny



Sep 4, 2007 at 8:51 AM
I have tried to map AreaPath to custom field in Project Server (Area) and it works in TFS->PS direction but doesn't work from PS to TFS. This is code from Web.config :

<add
entityName="AssignmentCustomFields"
partnerWorkItemField="Area"
tfsWorkItemField="System.AreaPath"
defaultValueToTFS=""
defaultValueFromTFS=""
type="Microsoft.Vsts.Ranger.Connector.PS2007Providers.PSEntityFieldMapping, Microsoft.Vsts.Ranger.Connector.PS2007Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Area Path">
</add>

Event viewer sent this message :
The WorkItem cannot be saved because the following fields are invalid: Area Path AreaID


Same situation appeared when I tried to map Iteration field. It works in TFS->PS direction but doesn't work vice versa.

<add
entityName="AssignmentCustomFields"
partnerWorkItemField="Iteration"
tfsWorkItemField="System.IterationPath"
defaultValueToTFS=""
defaultValueFromTFS=""
type="Microsoft.Vsts.Ranger.Connector.PS2007Providers.PSEntityFieldMapping,
Microsoft.Vsts.Ranger.Connector.PS2007Providers,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Iteration Path">
</add>

Message: The WorkItem cannot be saved because the following fields are invalid: Iteration Path IterationID

Coordinator
Sep 10, 2007 at 12:32 PM

gzoranovic,
I imagine there needs to be some sort of transformation for the fields to be valid before they can be saved within TFS. I do not see and FieldMappingRules (i.e. transformation rules) listed above. What are the values of the fields prior to trying to save them within TFS (i.e. as they exist in PS)? What are the allowed values within TFS?