System Controls - Update

Updates/adds a system control on the work item form.

PATCH https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols/{controlId}?api-version=6.0-preview.1

URI Parameters

Name In Required Type Description
controlId
path True
  • string

The ID of the control.

organization
path True
  • string

The name of the Azure DevOps organization.

processId
path True
  • string
uuid

The ID of the process.

witRefName
path True
  • string

The reference name of the work item type.

api-version
query True
  • string

Version of the API to use. This should be set to '6.0-preview.1' to use this version of the api.

Request Body

Name Type Description
contribution

Contribution for the control.

controlType
  • string

Type of the control.

height
  • integer

Height of the control, for html controls.

id
  • string

The id for the layout node.

inherited
  • boolean

A value indicating whether this layout node has been inherited. from a parent layout. This is expected to only be only set by the combiner.

isContribution
  • boolean

A value indicating if the layout node is contribution or not.

label
  • string

Label for the field.

metadata
  • string

Inner text of the control.

order
  • integer

Order in which the control should appear in its group.

overridden
  • boolean

A value indicating whether this layout node has been overridden . by a child layout.

readOnly
  • boolean

A value indicating if the control is readonly.

visible
  • boolean

A value indicating if the control should be hidden or not.

watermark
  • string

Watermark text for the textbox.

Responses

Name Type Description
200 OK

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.work_write Grants the ability to read, create, and update work items and queries, update board metadata, read area and iterations paths other work item tracking related metadata, execute queries, and to receive notifications about work item events via service hooks.

Examples

Update/Add a System Control

Sample Request

PATCH https://dev.azure.com/{organization}/_apis/work/processes/a6c1d9b6-ea27-407d-8c40-c9b7ab112bb6/workItemTypes/{witRefName}/layout/systemcontrols/System.Reason?api-version=6.0-preview.1
{
  "visible": false
}

Sample Response

{
  "id": "System.Reason",
  "label": "Reason",
  "controlType": "FieldControl",
  "readOnly": false,
  "visible": false,
  "isContribution": false
}

Definitions

Control

Represent a control in the form.

WitContribution

Properties of a work item form contribution

Control

Represent a control in the form.

Name Type Description
contribution

Contribution for the control.

controlType
  • string

Type of the control.

height
  • integer

Height of the control, for html controls.

id
  • string

The id for the layout node.

inherited
  • boolean

A value indicating whether this layout node has been inherited. from a parent layout. This is expected to only be only set by the combiner.

isContribution
  • boolean

A value indicating if the layout node is contribution or not.

label
  • string

Label for the field.

metadata
  • string

Inner text of the control.

order
  • integer

Order in which the control should appear in its group.

overridden
  • boolean

A value indicating whether this layout node has been overridden . by a child layout.

readOnly
  • boolean

A value indicating if the control is readonly.

visible
  • boolean

A value indicating if the control should be hidden or not.

watermark
  • string

Watermark text for the textbox.

WitContribution

Properties of a work item form contribution

Name Type Description
contributionId
  • string

The id for the contribution.

height
  • integer

The height for the contribution.

inputs
  • object

A dictionary holding key value pairs for contribution inputs.

showOnDeletedWorkItem
  • boolean

A value indicating if the contribution should be show on deleted workItem.