YouTrack Standalone 2017.2 Help

Fields

Contains all issue custom fields.

Properties

NameTypeDescriptionRead-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:

NameTypeDescription
field string, ProjectCustomField the field to check.
expected Object expected value of the field.

Returns:

TypeDescription
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:

NameTypeDescription
field string, ProjectCustomField the project custom field to check read access to.
user User to check access for.

Returns:

TypeDescription
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:

NameTypeDescription
field string, ProjectCustomField the project custom field to check write access to.
user User to check access for.

Returns:

TypeDescription
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:

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

Returns:

TypeDescription
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 changedin the transaction, this value is equal to the current value of the field.

Parameters:

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

Returns:

TypeDescription
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:

NameTypeDescription
fieldName string name of the field to check.
message string to show in case the field is not set.

 

Last modified: 9 August 2017