urlreader
urlreader

Reputation: 6605

Add Custom column to UI in TFS?

Here is how I added [AHA Reference] column (custom column) to my local TFS, which I learned from https://learn.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 enter image description here

3) then I added a Control node under FORM enter image description here

4) then in the TFS, I added [AHA Reference] column, and I can see it in the list. enter image description here

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. enter image description here

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

Upvotes: 0

Views: 380

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31013

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:

Upvotes: 2

Related Questions