Yesterday I got the chance to spend a little more time on my new setup Team Foundation Server. I managed to do an import of the work item types I created for my Beta 2 setup and found that for my situation there where 3 changes I needed to make to my Type definition XML. These changes where:
There are some changes on how constrained fields are managed. I got the following message on my definition:
Ln 121 Col 11: The ‘field’ attribute is invalid – The value ‘PriorityString’ is
invalid according to its datatype ‘http://schemas.microsoft.com/VisualStudio/200
5/workitemtracking/typelib:ReferenceFieldName’ – The Pattern constraint failed.
This has to do with my following definition:
<FIELD name=”PriorityString” refname=”InfoSupport.Endeavour.Common.Priority” type=”String” reportable=”dimension”>
<HELPTEXT>Priority to the business</HELPTEXT>
<ALLOWEDVALUES>
<LISTITEM value=”4 – Low”/>
<LISTITEM value=”3 – Normal”/>
<LISTITEM value=”2 – High”/>
<LISTITEM value=”1 – Crash”/>
</ALLOWEDVALUES>
<DEFAULT from=”value” value=”3 – Normal”/>
</FIELD>
And the following depending field:
<FIELD name=”PriorityRollup” refname=”InfoSupport.Endeavour.Common.PriorityRollup” type=”String” reportable=”dimension”>
<HELPTEXT>Mapping field used for status rollup</HELPTEXT>
<ALLOWEDVALUES>
<LISTITEM value=”1 – High”/>
<LISTITEM value=”2 – Medium”/>
<LISTITEM value=”3 – Low”/>
</ALLOWEDVALUES>
<WHEN field=”PriorityString” value=”4 – Low”>
<COPY from=”value” value=”3 – Low”/>
</WHEN>
<WHEN field=”PriorityString” value=”3 – Normal”>
<COPY from=”value” value=”2 – Medium”/>
</WHEN>
<WHEN field=”PriorityString” value=”2 – High”>
<COPY from=”value” value=”1 – High”/>
</WHEN>
<WHEN field=”PriorityString” value=”1 – Crash”>
<COPY from=”value” value=”1 – High”/>
</WHEN>
</FIELD>
I Use this so we can have each project make it’s own list of priorities and have these rollup into the datawarehouse mapping to only 3 levels we want to know cross projects. This would be our way of not manually having to tweak the datawarehouse but use the WIT type definition to dynamicly propagate this “translation” in the datawarehouse.
At this moment I couldn’t fix this so I went along marking the <when> sections as comment.
Furtheremore I found that the TFSStructureControl has been renamed to WorkItemClassificationControl and that was easy to fix.
Last thing that I needed to fix in the XML was the definition of the date fields.
I got the following message:
Actual reporting settings for the field Microsoft.VSTS.Common.ClosedDate are different from those specified in the XML. Changing these settings it prohibited.
Because the datawarehouse now handles one Date dimension for all date related data we do not have to mark this field as a dimension in the workitem type reporting attribute. So romoving this attribute in the definition fixed this as well. And now I got my defect work item up and running again.
Now I am of to PDC. It’s now almost 6 AM and I need to get to Amsterdam to catch my plain.
4 comments
Let me explain you about the scenario
– customizing the msf agile process template
– adding new work item types..for eg: A and B
– lets assume they are created and i’m using them in a team project
When i create a new "B" work item, need to see a drop down of all "A" work items in the Team project.
How can i have a custom field in the xml for "B" using the AllowedValues tag that can read from instances of the work item type "A"
VDeevi.
I think the only way to achieve such relations would be to create a global list that gets popultaed by a custom process that reacts on the event fired on a changed workitem. This list can than be used by workitem B to refer to that lsit of available items that is populated during the save of WI A by the custom process. This is not a standard thnig, you need to work with the event system to register your listener process to the WIT saved event and use the object model to add a new atem to the workitem global list.
marcelv
Did you also make your template for Beta2? Have you tried to import that in the july CTP as well?
Thys
No, I posponed that to Beta 3. Now that B3 is available I will be working on migrating the template as well to the B3 bits. I willpost my insights on that as well.
Marcel de Vries