将自定义列添加到 TFS 中的 UI? [英] Add Custom column to UI in TFS?

查看:30
本文介绍了将自定义列添加到 TFS 中的 UI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是我如何将 [AHA Reference] 列(自定义列)添加到我的本地 TFS,这是我从中学到的

3) 然后我在 FORM 下添加了一个 Control 节点

4) 然后在TFS中,我添加了[AHA Reference]列,我可以在列表中看到它.

5) 由于我在步骤 3 中添加了控件,我的理解是在详细信息弹出窗口中,它应该在值区域"下显示 [AHA 参考].它从未出现.但是,添加了 [AHA Reference] 字段,我可以从代码中检索它.

也许我的理解不正确.不是一个重要的问题.我只是好奇 WIT 中的控制"节点如果不将控制"添加到 UI 会做什么.

谢谢

解决方案

这是因为您在第 3 步中在旧表单/团队资源管理器下添加了 Control.如果您返回旧表单,您将看到此字段.为了让控件在新的网页表单中显示,需要在

...
下添加控件:>

 
<网页布局><页面标签="详细信息" LayoutMode="FirstColumnWide"><部分><组标签="详细信息"><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="时间临界性" 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"/></组></节></页面></WebLayout>

有用的链接:

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:

这篇关于将自定义列添加到 TFS 中的 UI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆