使用" WitAdmin.exe"重命名工作项在TFS中无法正常工作

时间:2015-10-11 10:44:53

标签: tfs tfs2013

我需要在TFS(TFS 2013.5和scrum模板)中重命名工作项,因此我使用了 WitAdmin.exe 命令。我重命名了一个工作项(例如" Bug" to" Bug2")但是在我从工作项定义(使用listwitd命令)获取列表后重命名后,显示了这个重命名的工作项以下奇怪的名字!!

  

Main_Bar / Main_Bar_20151002.2

过了一会儿,我意识到这个名字来自构建定义名称。

更奇怪的是,在门户网站中显示了正确的名称(" Bug2")但是在团队资源管理器中再次存在奇怪的名称!!

我尝试了来自各个团队项目的一些工作项目,但结果是一样的。

然后我在这个TFS中创建了一个新的项目集合,也是一个团队项目。接下来,我重新命名了这个团队项目中的一些工作项,并且运行良好。

还有另一个有趣的方面,由于" /"它不可能重命名这个奇怪的名字。中间的角色!!

这是bug工作项的模板:

<?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="Bug">
    <DESCRIPTION>Describes a divergence between required and actual behavior, and tracks the work done to correct the defect and verify the correction.</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 />
      </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="System Info" refname="Microsoft.VSTS.TCM.SystemInfo" type="HTML" />
      <FIELD name="Repro Steps" refname="Microsoft.VSTS.TCM.ReproSteps" type="HTML" />
      <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Severity" refname="Microsoft.VSTS.Common.Severity" type="String" reportable="dimension">
        <ALLOWEDVALUES expanditems="true">
          <LISTITEM value="1 - Critical" />
          <LISTITEM value="2 - High" />
          <LISTITEM value="3 - Medium" />
          <LISTITEM value="4 - Low" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="3 - Medium" />
      </FIELD>
      <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
        <SUGGESTEDVALUES expanditems="true">
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
        <SUGGESTEDVALUES expanditems="true" filteritems="excludegroups">
          <GLOBALLIST name="Builds - Bime.Net" />
        </SUGGESTEDVALUES>
      </FIELD>
      <FIELD name="Found In" refname="Microsoft.VSTS.Build.FoundIn" type="String" reportable="dimension">
        <SUGGESTEDVALUES expanditems="true">
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
        <SUGGESTEDVALUES expanditems="true" filteritems="excludegroups">
          <GLOBALLIST name="Builds - Bime.Net" />
        </SUGGESTEDVALUES>
      </FIELD>
      <FIELD name="Backlog Priority" refname="Microsoft.VSTS.Common.BacklogPriority" type="Double" reportable="detail" />
      <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" />
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="New">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Approved">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Done">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Scheduling.Effort">
              <READONLY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Removed" />
        <STATE value="Committed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="New">
          <REASONS>
            <DEFAULTREASON value="New defect reported" />
            <REASON value="Build Failure" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Approved" to="New">
          <REASONS>
            <DEFAULTREASON value="Moved to the backlog" />
          </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="Committed" to="New">
          <REASONS>
            <DEFAULTREASON value="Moved to the backlog" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="New" to="Approved">
          <REASONS>
            <DEFAULTREASON value="Approved by the Product Owner" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Done" to="Approved">
          <REASONS>
            <DEFAULTREASON value="Additional work found" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Committed" to="Approved">
          <REASONS>
            <DEFAULTREASON value="Work stopped" />
          </REASONS>
        </TRANSITION>
        <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" />
            <REASON value="Duplicate" />
            <REASON value="Not a Bug" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Approved" to="Removed">
          <REASONS>
            <DEFAULTREASON value="Removed from the backlog" />
            <REASON value="Duplicate" />
            <REASON value="Not a Bug" />
          </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>
        <TRANSITION from="Done" to="Committed">
          <REASONS>
            <DEFAULTREASON value="Additional work found" />
          </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;" />
          </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 FieldName="System.State" Type="FieldControl" Label="Stat&amp;e" LabelPosition="Left" />
                <Control FieldName="System.Reason" Type="FieldControl" Label="Reason" LabelPosition="Left" />
              </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.Severity" Type="FieldControl" Label="Severity" LabelPosition="Left" />
                <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area" LabelPosition="Left" />
                <Control FieldName="Microsoft.VSTS.Common.BacklogPriority" Type="FieldControl" Label="Backlog Priority" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="50">
            <TabGroup>
              <Tab Label="Steps to Reproduce">
                <Control FieldName="Microsoft.VSTS.TCM.ReproSteps" Type="HtmlFieldControl" Label="" LabelPosition="Top" MinimumSize="(100,200)" Dock="Fill" />
              </Tab>
              <Tab Label="System">
                <Group Label="Build">
                  <Column PercentWidth="100">
                    <Control FieldName="Microsoft.VSTS.Build.FoundIn" Type="FieldControl" Label="Found In Build" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Build.IntegrationBuild" Type="FieldControl" Label="Integrated in Build" LabelPosition="Left" />
                  </Column>
                </Group>
                <Control FieldName="Microsoft.VSTS.TCM.SystemInfo" Type="HtmlFieldControl" Label="System Info" LabelPosition="Top" Dock="Fill" />
              </Tab>
              <Tab Label="Test Cases">
                <Control Type="LinksControl" Name="TestedBy" Label="" LabelPosition="Top">
                  <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" Label="" LabelPosition="Top" Name="TaskLinks">
                  <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="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" MinimumSize="(100,200)" />
              </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" LabelPosition="Top" />
              </Tab>
            </TabGroup>
          </Column>
        </Group>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</witd:WITD>

2 个答案:

答案 0 :(得分:2)

我在删除工作项类型时遇到了此问题,但它仍将显示在团队资源管理器中。您是否尝试过清除本地TFS缓存?

C:\用户\&LT;您的别名&gt; \ AppData \ Local \ Microsoft \ Team Foundation \&lt;版本号&gt; \缓存

答案 1 :(得分:0)

重命名工作项

后,您需要重置托管TFS的IIS