YouTrack InCloud 2017.2 Help

BundleProjectCustomField

Extends: ProjectCustomField

Represents a project custom field with a predefined set of values.

Properties

NameTypeDescriptionRead-only
localizedName String Localized name of the field. /help/img/youtrack/2017.2/checkbox-marked.png
name String Name of the field. /help/img/youtrack/2017.2/checkbox-marked.png
nullValueText String The text to be displayed for this field in case it has not value. /help/img/youtrack/2017.2/checkbox-marked.png
values Set.<Field> Available values of this field. /help/img/youtrack/2017.2/checkbox-marked.png

Methods

 

becomes

becomes(fieldName, expected)

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

Parameters:

NameTypeDescription
fieldName string name of the field to check.
expected string expected value.

Returns:

TypeDescription
boolean `true` in case the expectation is met.

 

canBeReadBy

canBeReadBy(fieldName, user)

Checks if a field can be read by a user.

Parameters:

NameTypeDescription
fieldName string name of the field.
user User to check access for.

Returns:

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

 

canBeWrittenBy

canBeWrittenBy(fieldName, user)

Checks if a field can be written by a user.

Parameters:

NameTypeDescription
fieldName string name of the field.
user User to check access for.

Returns:

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

 

findValueByName

findValueByName(name)

Returns a value with the specified name for this field.

Parameters:

NameTypeDescription
name String The name of the field value to search for.

Returns:

TypeDescription
Field Value found.

 

findValueByOrdinal

findValueByOrdinal(ordinal)

Returns a value with the specified position for this field.

Parameters:

NameTypeDescription
ordinal Number The position of the field value to search by.

Returns:

TypeDescription
Field Value found.

 

getBackgroundColor

getBackgroundColor(issue)

Returns the background color that is used for this field value in the specified issue.Can return `null`, `"white"` or a hex color presentation.

Parameters:

NameTypeDescription
issue Issue The issue for which the background color is returned.

Returns:

TypeDescription
String The background color that is used for this field value in the specified issue.

 

getForegroundColor

getForegroundColor(issue)

Returns the foreground color that is used for this field value in the specified issue.Can return `null`, `"white"` or a hex color presentation.

Parameters:

NameTypeDescription
issue Issue The issue for which the foreground color is returned.

Returns:

TypeDescription
String The foreground color that is used for this field value in the specified issue.

 

getValuePresentation

getValuePresentation(issue)

Returns the string presentation of the value that is used for this field in the specified issue.

Parameters:

NameTypeDescription
issue Issue The issue for which the value presentation is returned.

Returns:

TypeDescription
String The string presentation of the value.

 

isChanged

isChanged(fieldName)

Checks if a field is changed in the current transaction.

Parameters:

NameTypeDescription
fieldName string name of the field (e.g. 'summary') to check.

Returns:

TypeDescription
boolean `true` in case the field is changed in the current transaction.

 

oldValue

oldValue(fieldName)

Returns the previous value of a single-valued 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
fieldName string name of the field (e.g. 'updated') to get previous value of.

Returns:

TypeDescription
Object previous value of the field.

 

required

required(fieldName, message)

Checks if a the entity has a field denoted by field name set, shows error message otherwise.

Parameters:

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

 

Last modified: 9 August 2017