0
votes

I currently have a TFS process template using a Bug Work Item type that contains the "Found In" and "Integration Build" fields.

They are defined like this in the work item definition XML file :

<FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
  <HELPTEXT>The build in which the bug was fixed</HELPTEXT>
  <SUGGESTEDVALUES expanditems="true">
    <LISTITEM value="&lt;None&gt;" />
  </SUGGESTEDVALUES>
</FIELD>
<FIELD name="Found In" refname="Microsoft.VSTS.Build.FoundIn" type="String" reportable="dimension">
  <HELPTEXT>The build in which the bug was found</HELPTEXT>
  <SUGGESTEDVALUES expanditems="true">
    <LISTITEM value="&lt;None&gt;" />
  </SUGGESTEDVALUES>
  <REQUIRED />
</FIELD>

I wanted to use the auto-populated builds global list so I added the following lines as suggested on msdn :

<SUGGESTEDVALUES expanditems="true" filteritems="excludegroups">
   <GLOBALLIST name="Builds - ProjectXYZ" />
</SUGGESTEDVALUES>

But I would like to share the same work item definition for ALL our projects. So my question is really simple, is there a way to replace "ProjectXYZ" by a variable that contains the name of the project that is using the work item definition ?

Basically this is what I would like :

<FIELD name="Found In" refname="Microsoft.VSTS.Build.FoundIn" type="String" reportable="dimension">
      <HELPTEXT>The build in which the bug was found</HELPTEXT>
      <SUGGESTEDVALUES expanditems="true">
        <LISTITEM value="&lt;None&gt;" />
      </SUGGESTEDVALUES>
    <SUGGESTEDVALUES expanditems="true" filteritems="excludegroups">
       <GLOBALLIST name="Builds - ${TeamProjectName}" />
    </SUGGESTEDVALUES>
      <REQUIRED />
    </FIELD>
1

1 Answers

0
votes

No it is not possible to use a variable there.

If you don't have many team projects you could use a when clause for each team project.

This would only work if you only had a few projects as It would get cumbersome otherwise.