DManDark
DManDark

Reputation: 23

Don't know how to set a Boolean workitem field in Azure DevOps Server to display Yes/No instead of True/False

I'm running Azure DevOps Server 2019 and I added a Boolean field to my User Story work item. The description for Boolean fields says "Boolean: Adds a True/False or Yes/No field.". It defaults to displaying a True/False toggle. I can't find how to change it to display a Yes/No toggle instead.

Upvotes: 2

Views: 1176

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31063

Sorry for confusion. The value "Yes/No" is actually not supported for a Boolean field type by default. An a workaround, you can use String type instead of Boolean type, which render a dropdown box for Yes/No:

<FieldDefinition name="MyField" refname="My.Field" type="String">
  <ALLOWEDVALUES expanditems="true">
    <LISTITEM value="Yes" />
    <LISTITEM value="No" />
  </ALLOWEDVALUES>
</FieldDefinition>

Upvotes: 0

Related Questions