Fields
In the workflow programming language, a field
is
The properties and methods listed on this page reference values that are stored in custom fields, and the field definitions in a project.
Custom Field Properties
The following properties refer to custom fields and the values that are stored in a custom field.
See also Field-related Methods.
The following properties are read-only.
Property | Description |
---|
name: String | The name of the custom field. |
description: String | The description of the custom field. |
ordinal: integer | The ordinal number that is assigned to the custom field.
This number determines the sort order in the issues list and full page issue view. |
The following properties are available for custom fields with specific data types.
These properties are read-only.
Property | Field Type | Description |
---|
colorIndex: integer | EnumField | The index number of the color that is associated with this value. |
isResolved: Boolean | State | True if this particular value is regarded as resolved. |
owner: user | OwnedField | The user who is the owner for this value.
For example, the owner of a subsystem. |
ordinal: integer | OwnedField, EnumField | The index of the value in the field. |
assembleDate: date | Build | The date when this build was assembled. |
releaseDate: date | Version | The date when this version was released (can be null ). |
released: Boolean | Version | True if this version is released. |
archived: Boolean | Version | True if this version is archived. |
Custom Field-related Methods and Operations
The following method is available for all custom fields.
getPresentation
The following operations are available for all custom fields.
becomes(value: [field]): Boolean |
---|
Parameters | value | The value to check for the specified field. |
Description | Checks whether a specific value is set for a custom field in the current transaction. |
Example | when State == {Verified} && !State.becomes({Verified}) {
assert comments.added.isEmpty: l10n ( Commenting for fixed and verified issues is disabled. );
}
|
canBeReadBy(user: user): Boolean |
---|
Parameters | user | The user for whom the permission to read the field is checked. |
Description | Checks whether a specific user has permission to read the custom field. |
canBeWrittenBy(user: user): Boolean |
---|
Parameters | user | The user for whom the permission to update the field is checked. |
Description | Checks whether a specific user has permission to update the custom field. |
Example | when duplicates.added.isNotEmpty && State != {Duplicate} {
if (State.canBeWrittenBy(loggedInUser)) {
State = {Duplicate};
}
}
|
changed(): Boolean |
---|
Description | Checks whether a the value of the custom field is changed in the current transaction. |
Example |
|
oldValue(): [field type] |
---|
Description | Returns the previous value of the specified custom field before an update was applied. |
Example | when State == {Verified} && !State.becomes({Verified}) {
assert comments.added.isEmpty: l10n ( Commenting for fixed and verified issues is disabled. );
}
|
required(message: string) |
---|
Parameters | message | The message that is displayed to the user that describes the field requirement. |
Description | Asserts that a value is set for a custom field.
Can also be used for link types.
If a value for the required field is not set, the field is highlighted in the issue and the specified message is displayed. |
Example | state Approved {
enter {
Assignee.required("Please select an assignee");
}
|
Project Field Properties
The following property is available for a project field.
Property | Description |
---|
nullValueText: string | The empty value text. Returns a null value when not set. |
Project Field-related Methods
Project fields represent the list of all the custom fields attached to the project.
While the methods described in Custom Fields relate to the values of the custom fields, these methods refer to definition of the fields in the project.
getValuePresentation
getBackgroundColor
getForegroundColor
Last modified: 2 February 2017