We are using on-prem Devops Server 2022. This is a system that has been regularly upgraded since first implemented as TFS 2010.
We wish to modify the "Feature" work item type to include a pick-list of users. This field will represent the "Business Owner" of the feature and it will be a reportable field.
However, there does not appear to be a way to add a field for picking a user without stepping on an existing field. For instance, there are these existing System fields:
What I need is a generic system user list that I can assign to the field via pick list.
Any ideas on how to do this?
Yes, we have the XML process model due to the age of our system.
For the user pick list, I wanted the list of DevOps valid users, not a custom hard-coded list in the GlobalList.
After experimenting and breaking some things in my non-production Azure DevOps, I found what to do.
To start, the many resources online are good general references, but of little specific help for adding fields. I found no reference to the list and purpose of XML attributes for work item types.
After exporting the work item XML, I added a new field at the top using an existing user field as a pattern. The key is specifying a refname
for the field. In my case, I simply used the collection name and the field name.
For example: refname="DefaultCollection.BusinessOwner"
The complete field definition is:
<FIELD name="Business Owner" refname="DefaultCollction.BusinessOwner" type="String" syncnamechanges="true" reportable="dimension">
<HELPTEXT>This is the Business Sponsor most responsible for success of the project.</HELPTEXT>
<ALLOWEXISTINGVALUE />
<VALIDUSER />
</FIELD>
The attribute that allows using DevOps users for the picklist is <VALIDUSER />
I wanted this field to appear in web form with the Planning and Classification groups and to include a descriptive label. Down in the <WebLayout>
section of the XML, I added a new Group block above the Planning and Classification group blocks:
<Group Label="Business Owner">
<Control Type="LabelControl" Name="DefaultCollction.BusinessOwnerLabel" >
<LabelText>
<Text>Business Owner is the sponsor or resource planning designate for the project or feature.</Text>
</LabelText>
</Control>
<Control Type="FieldControl" FieldName="DefaultCollction.BusinessOwner" />
</Group>
After importing the revised WIT XML, the new field appeared as I wanted it. And it's reportable - I can select this field in queries and backlogs.