Reputation: 17121
I have a custom workflow created on our self-hosted Azure DevOps server. Currently, it's based on the XML that defines the Basic workflow apart from a new name and description.
I'm trying to add a field to the epic work-item type called "Contact Person." Using System.AssignedTo as a template, I've added this new field to"
I didn't add the custom field to SystemControls because that was causing a parse error. I did try the four above in various combinations. None caused errors, but none caused the field to appear when I create a new epic.
I've been up and down the documentation without answers. How do I edit the workflow to add this field? And is there anything like a linter that will tell me if my XML isn't going to do work the way it's supposed to?
Upvotes: 0
Views: 1505
Reputation: 16018
Here is the doc: Add or modify a field to track work. In your steps:
Additionally, you should add to the WIT/FORM/WebLayout/Page/Section/Group as Control to see it on the web form: WebLayout and Control elements.
Upvotes: 1
Reputation: 76700
Azure DevOps Server: - Adding a field to a work-item type
The reason for this issue is that:
I didn't add the custom field to SystemControls because that was causing a parse error.
Indeed, the System namespace is used only to define all core system fields that are mandatory for Team Foundation system functions. Team Foundation Server prevents you from creating your own System.X field because it might impede Team Foundation Server functionality.
On-premises XML process model:
You can modify select elements within the SystemControls section, such as changing the EmptyText attribute value for the System.Title field. In general, we recommend you don't customize this section much more than that. For example, you can't remove fields from or add other fields within this section.
So, we could not add the custom field under the SystemControls
. But we need add it under the Section
, check following scripts:
<Section>
<Group Label="Planning">
<Control Label="Priority" Type="FieldControl" FieldName="Microsoft.VSTS.Common.Priority" />
<Control Label="ContactTo" Type="FieldControl" FieldName="Custom.ContactTo" />
<Control Label="Start Date" Type="DateTimeControl" FieldName="Microsoft.VSTS.Scheduling.StartDate" />
<Control Label="Target Date" Type="DateTimeControl" FieldName="Microsoft.VSTS.Scheduling.TargetDate" />
</Group>
</Section>
The ContactTo
is my custom label.
Then, we could see it in the custom process:
Hope this helps.
Upvotes: 1