YouTrack Standalone 2019.2 Help

PUT Prototype

PUT /admin/customfield/field/{customFieldName}

Create new custom field prototype

PUT /rest/admin/customfield/field/{customFieldName}?{typeName}&{isPrivate}&{defaultVisibility}&{autoAttached}

Parameters:

Name

Type

Description

customFieldName

string

Name for a custom field to be created.

typeName

string

Type of a new custom field. For a list of possible values, see Field Types

isPrivate

boolean

Set new custom field privacy.

defaultVisibility

boolean

Set default visibility for the new custom field.

autoAttached

boolean

The custom field should be attached automatically to each newly created project in YouTrack.

Sample

Request:

PUT /rest/admin/customfield/field/Region?typeName=enum[*]&isPrivate=false&defaultVisibility=true&autoAttached=false

Response:

<customFieldPrototypeRef name="Region" url="http://youtrack.jetbrains.net/rest/admin/customfield/field/Region"/>

Field Types

The typeName parameter accepts a predefined list of values. These values correspond to the data types that are supported for custom fields in YouTrack.

Value

Field Type

string

Stores a single value as a string of characters.

date

Stores a single value in a date format.

date and time

Stores a single value in a date format. The complete date and time are shown in the custom field.

period

Stores a value that represents a period of time.

integer

Stores a single value as an integer.

float

Stores a single value as a floating-point number.

enum[1]

Stores single values from a predefined set of values.

enum[*]

Stores multiple values from a predefined set of values.

group[1]

Stores a reference to a single group.

group[*]

Stores references to one or more groups.

user[1]

Stores a reference to a single user account.

user[*]

Stores references to one or more user accounts.

ownedField[1]

Stores single values from a predefined set of values. Each value in the set of values stores an optional owner property.

ownedField[*]

Stores multiple values from a predefined set of values. Each value in the set of values stores an optional owner property.

state

Stores the state of an issue from a predefined set of issue states. Only supports single values.

version[1]

Stores a version from a predefined list of versions.

version[*]

Stores one or more versions from a predefined list of versions.

build[1]

Stores a build number from a predefined set of build numbers.

build[*]

Stores one or more build numbers from a predefined set of build numbers.

For a detailed description of each custom field type, see Custom Field Types.

Last modified: 17 December 2019