YouTrack Standalone 2017.3 Help

Fields

Contains all issue custom fields.

Properties

Name

Type

Description

Read-only

'Affected versions'

Set.<ProjectVersion>

Custom field of type Set<ProjectVersion>

'Due Date'

Number

Custom field of type Number

'Fix versions'

Set.<ProjectVersion>

Custom field of type Set<ProjectVersion>

'Fixed in build'

Build

Custom field of type Build

Assignee

User

Custom field of type User

Priority

EnumField

Custom field of type EnumField

State

State

Custom field of type State

Subsystem

OwnedField

Custom field of type OwnedField

Type

EnumField

Custom field of type EnumField

Methods


becomes

static becomes(field, expected)

Checks that a value a custom field receives in the current transaction is equal to an expected one.

Parameters

Name

Type

Description

field

string, ProjectCustomField

the field to check.

expected

Object

expected value of the field.

Return Value

Type

Description

boolean

`true` in case the expectation is met.

 

canBeReadBy

static canBeReadBy(field, user)

Checks if a custom field can be read by a user.

Parameters

Name

Type

Description

field

string, ProjectCustomField

the project custom field to check read access to.

user

User

to check access for.

Return Value

Type

Description

boolean

`true` in case the custom field can be read by the user.

 

canBeWrittenBy

static canBeWrittenBy(field, user)

Checks if a custom field can be written by a user.

Parameters

Name

Type

Description

field

string, ProjectCustomField

the project custom field to check write access to.

user

User

to check access for.

Return Value

Type

Description

boolean

`true` in case the custom field can be written by the user.

 

isChanged

static isChanged(field)

Checks if a custom field is changed in the current transaction.

Parameters

Name

Type

Description

field

string, ProjectCustomField

the project custom field (e.g. 'State') or a reference to the field to check.

Return Value

Type

Description

boolean

`true` in case the custom field is changed in the current transaction.

 

oldValue

static oldValue(field)

Returns the previous value of a single-valued custom field before an update was applied. In case the field is not changed in the transaction, this value is equal to the current value of the field.

Parameters

Name

Type

Description

field

string, ProjectCustomField

the project custom field (e.g. 'State') or a reference to get previous value of.

Return Value

Type

Description

Object

previous value of the custom field.

 

required

static required(fieldName, message)

Checks if a the issue has a custom field set to non-empty value, shows error message otherwise.

Parameters

Name

Type

Description

fieldName

string

name of the field to check.

message

string

to show in case the field is not set.

 

Last modified: 7 March 2019