Here is how I added [AHA Reference] column (custom column) to my local TFS, which I learned from
https://docs.microsoft.com/en-us/vsts/work/customize/reference/witadmin/witadmin-import-export-manage-wits?view=tfs-2018
1) run below command to export the WIT
witadmin exportwitd /collection:http://XXXXX:8080/tfs/DefaultCollection /p:LocalTestProject /f:c:\temp\myworkitems_local.xml /n:Feature
2) In the generated xml file, I added this to the FIELDS node
3) then I added a Control node under FORM
4) then in the TFS, I added [AHA Reference] column, and I can see it in the list.
5) Since I added control in step 3, my understanding is that in the detail popup, it should show the [AHA Reference] under ‘value area’. It never showed up. But, the [AHA Reference] field is added and I can retrieve it from code.
Maybe my understanding is not correct. Not an important question. I’m just curious what that ‘Control’ node in WIT does if not adding the ‘control’ to UI.
Thanks
It's because you added the Control under the old form/team explorer in step 3. If you back to old form, you'll see this field. In order to make the Control shows in new web form, you need to add the control under <FORM><WebLayout>...</WebLayout></FORM>
:
<FORM>
<WebLayout>
<Page Label="Details" LayoutMode="FirstColumnWide">
<Section>
<Group Label="Details">
<Control Label="Priority" Type="FieldControl" FieldName="Microsoft.VSTS.Common.Priority" />
<Control Label="Effort" Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.Effort" />
<Control Label="Business Value" Type="FieldControl" FieldName="Microsoft.VSTS.Common.BusinessValue" />
<Control Label="Time Criticality" Type="FieldControl" FieldName="Microsoft.VSTS.Common.TimeCriticality" />
<Control Label="Value area" Type="FieldControl" FieldName="Microsoft.VSTS.Common.ValueArea" />
<Control Label="AHA Reference" Type="FieldControl" FieldName="AHAReference.AHAReference" />
</Group>
</Section>
</Page>
</WebLayout>
</FORM>
Useful links:
- https://docs.microsoft.com/en-us/vsts/work/customize/customize-wit-form?view=vsts
- https://docs.microsoft.com/en-us/vsts/work/customize/reference/weblayout-xml-elements?view=vsts