【问题标题】:Restricting work item state transitions to specific users将工作项状态转换限制为特定用户
【发布时间】:2013-04-23 09:31:38
【问题描述】:

我想将某些交易限制为特定用户。具体来说,我只想启用特定组用户(管理员\贡献者)来启用 WIT TRANSITION “A” to “B”。

我尝试关注these instructions。但是,当我尝试加载新的 WIT 时,出现以下错误:

Error importing work item type definition:

The 'for' attribute is invalid - The value '[Project Name]Project Administrators' is invalid according to its datatype 'http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typelib:IdentityName'- The Pattern constraint failed.

我的 WITD XML 如下:

<TRANSITION from="Integrated" to="Closed" for="[Project Name]Project Administrators">
    <REASONS>
        <DEFAULTREASON value="Verified Pass" />
    </REASONS>
    <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
            <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
            <ALLOWEXISTINGVALUE />
            <COPY from="currentuser" />
            <VALIDUSER />
        </FIELD>
    </FIELDS>
</TRANSITION>

【问题讨论】:

标签: xml azure tfs tfs-workitem


【解决方案1】:

您需要使用术语[Project] 来表示工作项的当前团队项目,并使用\ 将其与团队项目组分开:

<TRANSITION from="Integrated" to="Closed" for="[Project]\Project Administrators">
    <!-- Stuff -->
</TRANSITION>

【讨论】:

    【解决方案2】:

    来自 MSDN 的示例: http://msdn.microsoft.com/en-us/library/ms194981.aspx#Transitions

    <TRANSITION from="Closed" to="Active"
         for="[Project]\Testers"
          not="[Project]\Developers">
        . . .
    </TRANSITION>
    

    另请参阅: http://msdn.microsoft.com/en-us/library/aa337653(v=vs.110).aspx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-12
      • 2010-12-17
      • 1970-01-01
      • 2014-11-19
      • 2021-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多