VS2015和Web UI中的TFS机智字段宽度不同

时间:2015-12-08 22:14:56

标签: tfs visual-studio-2015

我对工作项有一组自定义控件。 (该服务器是本地TFS 2015) 该小组的定义是:

<Column PercentWidth="100">
    <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&amp;gned To" LabelPosition="Left" />
    <Control Type="LabelControl" Label="State Order : 1.New 2.Approved 3.Committed 4.Done 5.Removed" LabelPosition="Left" />
    <Control FieldName="System.State" Type="FieldControl" Label="Stat&amp;e" LabelPosition="Left" />
    <Control FieldName="System.Reason" Type="FieldControl" Label="Reason" LabelPosition="Left" ReadOnly="True" />
      <Group>
        <Column PercentWidth="8">
           <Control Type="LabelControl" Label="Release #" LabelPosition="Left" />
        </Column>
        <Column PercentWidth="5">
          <Control FieldName="MyCompany.ReleaseYear" Type="FieldControl" LabelPosition="Left" />
        </Column>
        <Column PercentWidth="5">
           <Control FieldName="MyCompany.MajorRelease" Type="FieldControl" LabelPosition="Left" />
        </Column>
        <Column PercentWidth="5">
          <Control FieldName="MyCompany.MinorRelease" Type="FieldControl" LabelPosition="Left" />
        </Column>
        <Column PercentWidth="5">
          <Control FieldName="MyCompany.HotfixRelease" Type="FieldControl" LabelPosition="Left" />
        </Column>
        <Column PercentWidth="25">
          <Control FieldName="MyCompany.HotfixSeverity" Type="FieldControl" LabelPosition="Left" />
        </Column>
     </Group>

如果查看示例中的Group元素,则1st和last控件的字段是字符串。中间的是整数。

问题是相同的工作项在Visual Studio 2015中以不同的方式显示并使用TFS Web界面。在Web界面中,它看起来都很好。 Image from Web UI

Visual Studio中的相同数据实际上是不可读的。

Image from Visual Studio 2015

即使选择了数据,您甚至无法看到前2个整数字段。 (他们是下降)。 VS版本似乎不符合字段或列宽。

有什么方法可以解决这个问题吗?

有没有办法让场边界出现在VS?

在这里要求充分的机智:

<?xml version="1.0" encoding="utf-8"?>
 <witd:WITD application="Work item type editor" version="1.0" xmlns:witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
<WORKITEMTYPE name="Product Backlog Item">
<DESCRIPTION>Tracks an activity the user will be able to perform with the product.</DESCRIPTION>
<FIELDS>
  <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension" />
  <FIELD name="Iteration ID" refname="System.IterationId" type="Integer" />
  <FIELD name="External Link Count" refname="System.ExternalLinkCount" type="Integer" />
  <FIELD name="Team Project" refname="System.TeamProject" type="String" reportable="dimension" />
  <FIELD name="Hyperlink Count" refname="System.HyperLinkCount" type="Integer" />
  <FIELD name="Attached File Count" refname="System.AttachedFileCount" type="Integer" />
  <FIELD name="Node Name" refname="System.NodeName" type="String" />
  <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension" />
  <FIELD name="Revised Date" refname="System.RevisedDate" type="DateTime" reportable="detail" />
  <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" reportable="dimension" />
  <FIELD name="ID" refname="System.Id" type="Integer" reportable="dimension" />
  <FIELD name="Area ID" refname="System.AreaId" type="Integer" />
  <FIELD name="Authorized As" refname="System.AuthorizedAs" type="String" syncnamechanges="true" />
  <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
    <REQUIRED />
  </FIELD>
  <FIELD name="State" refname="System.State" type="String" reportable="dimension" />
  <FIELD name="Authorized Date" refname="System.AuthorizedDate" type="DateTime" />
  <FIELD name="Watermark" refname="System.Watermark" type="Integer" />
  <FIELD name="Rev" refname="System.Rev" type="Integer" reportable="dimension" />
  <FIELD name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true" reportable="dimension" />
  <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension" />
  <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
    <ALLOWEXISTINGVALUE />
    <VALIDUSER />
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="[project]\Contributors" />
    </ALLOWEDVALUES>
  </FIELD>
  <FIELD name="Work Item Type" refname="System.WorkItemType" type="String" reportable="dimension" />
  <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" reportable="dimension" />
  <FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />
  <FIELD name="Description" refname="System.Description" type="HTML" />
  <FIELD name="History" refname="System.History" type="History" />
  <FIELD name="Related Link Count" refname="System.RelatedLinkCount" type="Integer" />
  <FIELD name="Tags" refname="System.Tags" type="PlainText" />
  <FIELD name="Backlog Priority" refname="Microsoft.VSTS.Common.BacklogPriority" type="Double" reportable="detail" />
  <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
    <SUGGESTEDVALUES expanditems="true">
      <LISTITEM value="&lt;None&gt;" />
    </SUGGESTEDVALUES>
  </FIELD>
  <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
    <WHENNOTCHANGED field="System.State">
      <READONLY />
    </WHENNOTCHANGED>
  </FIELD>
  <FIELD name="Effort" refname="Microsoft.VSTS.Scheduling.Effort" type="Double" reportable="measure" formula="sum" />
  <FIELD name="Acceptance Criteria" refname="Microsoft.VSTS.Common.AcceptanceCriteria" type="HTML" />
  <FIELD name="Business Value" refname="Microsoft.VSTS.Common.BusinessValue" type="Integer" reportable="measure" formula="sum" />
  <FIELD name="OldSystemObjectID" refname="OldSystem.Common.ObjectId" type="String" reportable="dimension" />
  <FIELD name="OldSystemFormattedID" refname="OldSystem.Common.FormattedId" type="String" reportable="dimension" />
  <FIELD name="OldSystemProjectName" refname="OldSystem.Common.Project" type="String" />
  <FIELD name="OldSystemUpdateTime" refname="OldSystem.Common.UpdateTime" type="DateTime" />
  <FIELD name="Support Ticket #" refname="MyCompany.SupportTicket" type="String" reportable="detail" />
  <FIELD name="OldSystemTags" refname="OldSystem.Common.Tags" type="String" />
  <FIELD name="Team" refname="MyCompany.Team" type="String" />
  <FIELD name="SVNLog" refname="MyCompany.SVNLog" type="HTML">
    <READONLY not="MyCompany\RT - SCM" />
  </FIELD>
  <FIELD name="MajorRelease" refname="MyCompany.MajorRelease" type="Integer" reportable="detail">
    <ALLOWEXISTINGVALUE />
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="1" />
      <LISTITEM value="10" />
      <LISTITEM value="11" />
      <LISTITEM value="12" />
      <LISTITEM value="13" />
      <LISTITEM value="14" />
      <LISTITEM value="15" />
      <LISTITEM value="16" />
      <LISTITEM value="17" />
      <LISTITEM value="18" />
      <LISTITEM value="19" />
      <LISTITEM value="2" />
      <LISTITEM value="20" />
      <LISTITEM value="21" />
      <LISTITEM value="22" />
      <LISTITEM value="23" />
      <LISTITEM value="24" />
      <LISTITEM value="3" />
      <LISTITEM value="4" />
      <LISTITEM value="5" />
      <LISTITEM value="6" />
      <LISTITEM value="7" />
      <LISTITEM value="8" />
      <LISTITEM value="9" />
    </ALLOWEDVALUES>
    <WHENNOT field="MyCompany.ReleaseYear" value="">
      <ALLOWEXISTINGVALUE />
      <REQUIRED />
    </WHENNOT>
  </FIELD>
  <FIELD name="Hotfix" refname="MyCompany.Hotfix" type="String" reportable="detail">
    <ALLOWEXISTINGVALUE />
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="0" />
      <LISTITEM value="1" />
      <LISTITEM value="2" />
      <LISTITEM value="3" />
      <LISTITEM value="4" />
      <LISTITEM value="5" />
    </ALLOWEDVALUES>
  </FIELD>
  <FIELD name="HotfixSeverity" refname="MyCompany.HotfixSeverity" type="String" reportable="detail">
    <ALLOWEXISTINGVALUE />
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="Hot Update" />
      <LISTITEM value="Hotfix" />
      <LISTITEM value="Regulatory" />
    </ALLOWEDVALUES>
    <WHEN field="MyCompany.HotfixRelease" value="1">
      <ALLOWEXISTINGVALUE />
      <REQUIRED />
    </WHEN>
    <WHEN field="MyCompany.HotfixRelease" value="2">
      <ALLOWEXISTINGVALUE />
      <REQUIRED />
    </WHEN>
    <WHEN field="MyCompany.HotfixRelease" value="3">
      <ALLOWEXISTINGVALUE />
      <REQUIRED />
    </WHEN>
    <WHEN field="MyCompany.HotfixRelease" value="4">
      <ALLOWEXISTINGVALUE />
      <REQUIRED />
    </WHEN>
    <WHEN field="MyCompany.HotfixRelease" value="5">
      <ALLOWEXISTINGVALUE />
      <REQUIRED />
    </WHEN>
  </FIELD>
  <FIELD name="ReleaseYear" refname="MyCompany.ReleaseYear" type="Integer" reportable="detail">
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="15" />
      <LISTITEM value="16" />
      <LISTITEM value="17" />
      <LISTITEM value="18" />
      <LISTITEM value="19" />
      <LISTITEM value="20" />
    </ALLOWEDVALUES>
  </FIELD>
  <FIELD name="MinorRelease" refname="MyCompany.MinorRelease" type="Integer" reportable="detail">
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="0" />
      <LISTITEM value="1" />
      <LISTITEM value="2" />
      <LISTITEM value="3" />
      <LISTITEM value="4" />
      <LISTITEM value="5" />
    </ALLOWEDVALUES>
    <WHENNOT field="MyCompany.MajorRelease" value="">
      <REQUIRED />
    </WHENNOT>
  </FIELD>
  <FIELD name="HotfixRelease" refname="MyCompany.HotfixRelease" type="Integer" reportable="detail">
    <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="1" />
      <LISTITEM value="2" />
      <LISTITEM value="3" />
      <LISTITEM value="4" />
      <LISTITEM value="5" />
    </ALLOWEDVALUES>
  </FIELD>
</FIELDS>
<WORKFLOW>
  <STATES>
    <STATE value="Approved">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Committed">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Done">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Scheduling.Effort">
          <READONLY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.BusinessValue">
          <READONLY />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="New">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Removed" />
  </STATES>
  <TRANSITIONS>
    <TRANSITION from="New" to="Done">
      <REASONS>
        <DEFAULTREASON value="Work finished" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Approved" to="Done">
      <REASONS>
        <DEFAULTREASON value="Work finished" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Committed" to="Done">
      <REASONS>
        <DEFAULTREASON value="Work finished" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="New" to="Removed">
      <REASONS>
        <DEFAULTREASON value="Removed from the backlog" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Approved" to="Removed">
      <REASONS>
        <DEFAULTREASON value="Removed from the backlog" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="" to="New">
      <REASONS>
        <DEFAULTREASON value="New backlog item" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Done" to="New">
      <REASONS>
        <DEFAULTREASON value="Moved to the backlog" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Removed" to="New">
      <REASONS>
        <DEFAULTREASON value="Reconsidering backlog item" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Approved" to="New">
      <REASONS>
        <DEFAULTREASON value="Moved to the backlog" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Committed" to="New">
      <REASONS>
        <DEFAULTREASON value="Moved to the backlog" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Done" to="Approved">
      <REASONS>
        <DEFAULTREASON value="Additional work found" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="New" to="Approved">
      <REASONS>
        <DEFAULTREASON value="Approved by the Product Owner" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Committed" to="Approved">
      <REASONS>
        <DEFAULTREASON value="Work stopped" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Done" to="Committed">
      <REASONS>
        <DEFAULTREASON value="Additional work found" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="New" to="Committed">
      <REASONS>
        <DEFAULTREASON value="Commitment made by the team" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Approved" to="Committed">
      <REASONS>
        <DEFAULTREASON value="Commitment made by the team" />
      </REASONS>
    </TRANSITION>
  </TRANSITIONS>
</WORKFLOW>
<FORM>
  <Layout HideReadOnlyEmptyFields="true" HideControlBorders="true">
    <Group Margin="(4,0,0,0)">
      <Column PercentWidth="100">
        <Control FieldName="System.Title" Type="FieldControl" ControlFontSize="large" EmptyText="&lt;Enter title here&gt;" LabelPosition="Top" />
      </Column>
    </Group>
    <Group Margin="(10,0,0,0)">
      <Column PercentWidth="100">
        <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Ite&amp;ration" LabelPosition="Left" />
      </Column>
    </Group>
    <Group Margin="(10,0,0,0)">
      <Column PercentWidth="50">
        <Group Label="Status">
          <Column PercentWidth="100">
            <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&amp;gned To" LabelPosition="Left" />
            <Control Type="LabelControl" Label="State Order : 1.New 2.Approved 3.Committed 4.Done 5.Removed" LabelPosition="Left" />
            <Control FieldName="System.State" Type="FieldControl" Label="Stat&amp;e" LabelPosition="Left" />
            <Control FieldName="System.Reason" Type="FieldControl" Label="Reason" LabelPosition="Left" ReadOnly="True" />
            <Group>
              <Column PercentWidth="12">
                <Control Type="LabelControl" Label="Release #" LabelPosition="Left" />
              </Column>
              <Column PercentWidth="5">
                <Control FieldName="MyCompany.ReleaseYear" Type="FieldControl" LabelPosition="Left" MinimumSize="(0,0)" />
              </Column>
              <Column PercentWidth="5">
                <Control FieldName="MyCompany.MajorRelease" Type="FieldControl" LabelPosition="Left" MinimumSize="(0,0)" />
              </Column>
              <Column PercentWidth="5">
                <Control Type="FieldControl" LabelPosition="Left" FieldName="MyCompany.MinorRelease" />
              </Column>
              <Column PercentWidth="5">
                <Control FieldName="MyCompany.HotfixRelease" Type="FieldControl" LabelPosition="Left" />
              </Column>
              <Column PercentWidth="25">
                <Control FieldName="MyCompany.HotfixSeverity" Type="FieldControl" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
      </Column>
      <Column PercentWidth="50">
        <Group Label="Details">
          <Column PercentWidth="100">
            <Control FieldName="Microsoft.VSTS.Scheduling.Effort" Type="FieldControl" Label="Effort" LabelPosition="Left" />
            <Control FieldName="Microsoft.VSTS.Common.BusinessValue" Type="FieldControl" Label="Business Value" LabelPosition="Left" />
            <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area" LabelPosition="Left" />
            <Control FieldName="MyCompany.SupportTicket" Type="FieldControl" Label="Support Ticket#" LabelPosition="Left" />
          </Column>
        </Group>
      </Column>
    </Group>
    <Group>
      <Column PercentWidth="50">
        <TabGroup>
          <Tab Label="Description">
            <Control FieldName="System.Description" Type="HtmlFieldControl" Label="" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="Storyboards">
            <Control Type="LinksControl" Name="StoryboardsControl" LabelPosition="Top">
              <LinksControlOptions>
                <WorkItemLinkFilters FilterType="excludeAll" />
                <ExternalLinkFilters FilterType="include">
                  <Filter LinkType="Storyboard" />
                </ExternalLinkFilters>
                <LinkColumns>
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Test Cases">
            <Control Type="LinksControl" Label="" LabelPosition="Top" Name="TestedBy">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.Id" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                </LinkColumns>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="Microsoft.VSTS.Common.TestedBy" FilterOn="forwardname" />
                </WorkItemLinkFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Test Case" />
                </WorkItemTypeFilters>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Tasks">
            <Control Type="LinksControl" Name="Hierarchy" Label="" LabelPosition="Top">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.Id" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                </LinkColumns>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="System.LinkTypes.Hierarchy" FilterOn="forwardname" />
                </WorkItemLinkFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Task" />
                </WorkItemTypeFilters>
              </LinksControlOptions>
            </Control>
          </Tab>
        </TabGroup>
      </Column>
      <Column PercentWidth="50">
        <TabGroup Margin="(5,0,0,0)">
          <Tab Label="Acceptance Criteria">
            <Control FieldName="Microsoft.VSTS.Common.AcceptanceCriteria" Type="HtmlFieldControl" Label="" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="History">
            <Control FieldName="System.History" Type="WorkItemLogControl" Label="" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="Links">
            <Control Type="LinksControl" Name="GeneralLinks" LabelPosition="Top">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.Id" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
                <WorkItemLinkFilters FilterType="includeAll" />
                <ExternalLinkFilters FilterType="includeAll" />
                <WorkItemTypeFilters FilterType="includeAll" />
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Attachments">
            <Control Type="AttachmentsControl" Label="" LabelPosition="Top" />
          </Tab>
          <Tab Label="Other">
            <Control FieldName="OldSystem.Common.ObjectId" Type="FieldControl" Label="OldSystem Object ID:" LabelPosition="Left" />
            <Control FieldName="OldSystem.Common.FormattedId" Type="FieldControl" Label="OldSystem Formatted ID:" LabelPosition="Left" />
            <Control FieldName="OldSystem.Common.Project" Type="FieldControl" Label="OldSystem Project:" LabelPosition="Left" />
            <Control FieldName="OldSystem.Common.UpdateTime" Type="FieldControl" Label="OldSystem Update Time:" LabelPosition="Left" />
            <Control FieldName="OldSystem.Common.Tags" Type="FieldControl" Label="OldSystemTags:" LabelPosition="Left" />
          </Tab>
          <Tab Label="SVN Commits">
            <Control FieldName="MyCompany.SVNLog" Type="HtmlFieldControl" LabelPosition="Left" Dock="Fill" />
          </Tab>
        </TabGroup>
      </Column>
    </Group>
  </Layout>
</FORM>
</WORKITEMTYPE>
</witd:WITD>

0 个答案:

没有答案