Fields
Fields by Object Type | |||||
---|---|---|---|---|---|
In the schema for the workflow programming language, a field
stores the property of an object.
Issue fields store all of the following information for an issue, including:
- All of the issue properties, such as the project, reporter, and visibility group.
- The set of available custom fields.
- The collections of comments, tags, link types, and attachments for an issue.
When a field stores a reference to an object with a proper type, you can access additional fields that store properties for the referenced object.
For example, the issue field reporter
stores a User
object.
When you reference the reporter
field, you can look up fields that store properties of the referenced user.
To reference the field for an object that is returned by a field reference, simply add dot and write the name of the field.
The workflow editor formats all fields in purple text. With code completion, the workflow editor displays a list of possible options that can be used with the preceding element.
This page provides a list of fields that are used in the workflow programming language.
Each field is presented in the format: [field name]: [data type]
.
Issue Fields
The current issue that is changed by the workflow rule is referenced as issue
.
When you set a reference to an issue field, you can reference the field directly.
For example, issue.Assignee = issue.reporter
and Assignee = reporter
do the same.
There are additional operations that are available for any field that stores a sequence
.
For more information, see Methods and Operations.
The following fields are available for issues. See also Issues.
Field | Description | State |
---|---|---|
reporter: User | The user who reported the issue. For example, Assignee = reporter sets the user who reported the issue as the assignee. | Read-only |
created: date | The date when the issue was created. | Read-only |
updated: date | The date when the issue was last updated. | Read-only |
resolved: date | The date when an issue was set to a value that is considered resolved.
When an issue enters a resolved state, the issue.resolved date is set to that moment.
When an issue returns to an unresolved state, the property is set to a null value. | Read-only |
permittedGroup: UserGroup | The user group for which the issue is visible. If the property contains a null value, the issue is visible to the All Users group. | Read-only |
comments: sequence<IssueComment> | A list of comments that have been added to the issue. | Read-only |
attachments: sequence<IssueAttachment> | The read-only list of attachments for the issue. | Read-only |
project: Project | The project to which the issue is assigned. | Read/write |
summary: string | The text that is entered as the issue summary. | Read/write |
description: string | The text that is entered as the issue description. | Read/write |
votes: integer | The number of votes for an issue. For vote-related methods, see canVoteIssue, voteIssue, canUnvoteIssue, and unvoteIssue. | Read/write |
tags: sequence<Issue> | The list of tags that are attached to an issue. | Read/write |
numberInProject: integer | The issue number in the project. | Read/write |
[link type name]: sequence<Issue> | The list of issues that are linked to the current issue with the specified link type name. | Read/write |
[field name]: [field type] | The value for the specified custom field. For example, Assignee returns a user , while State returns a state value.
If a custom field has an enumerated type, this property returns a sequence. | Read/write |
sprints: sequence<sprint> | The list of sprints to which an issue is assigned. | Read/write |
Sprint Fields
The following fields are available for sprints. These fields are read-only.
Field | Description |
---|---|
name: string | The name that is assigned to the sprint. |
description: string | The description of the sprint. |
ordinal: integer | The ordinal number that is assigned to the sprint. This number determines the order in which the sprint is displayed on the agile board. |
archived: Boolean | Is true if the sprint has been archived. |
agile: Agile | The agile board that contains the sprint. |
Agile Fields
The following fields are available for agile boards. These fields are read-only.
Field | Description |
---|---|
name: string | The name that is assigned to the agile board. |
sprints: sequence<Sprint> | The list of sprints that have been added to the agile board. |
CustomField Fields
The following fields store the properties of custom fields and their values. See also Field-related Methods.
The following fields are read-only.
The following fields are available for custom fields with specific data types. These fields are read-only.
Field | 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. |
IssueComment Fields
The following fields are available for comments that are added to an issue. For comment-related methods, see getEditedComments and addComment.
Property | Description | State |
---|---|---|
issue: Issue | The issue to which the comment was added. | Read-only |
author: User | The user who entered the comment. | Read-only |
created: date | The date when the comment was added to the issue. | Read-only |
updated: date | The date when the comment was last updated. | Read-only |
updatedBy: User | The user who last updated the comment. | Read-only |
text: string | The text that was entered as a comment. | Read/write |
permittedGroup: UserGroup | The group for which the comment is visible.
If permittedGroup == null , the comment is visible to the same group, as the issue it belongs to. | Read/write |
IssueAttachment Fields
The following fields are available for attachments that are added to an issue. See also clearAttachments.
Field | Description | State |
---|---|---|
issue: Issue | The issue to which the attachment was added. | Read-only |
author: User | The user who added the attachment. | Read-only |
created: date | The date when the attachment was added to the issue. | Read-only |
updated: date | The date when the attachment was last updated. | Read-only |
name: string | The filename of the attachment. | Read-only |
size: long | The size of the attachment in bytes. | Read-only |
extension: string | The file extension of the attachment. | Read-only |
metaData: string | The metadata properties of the attachment. For example, the dimensions of an image attachment. | Read-only |
removed: Boolean | True when the attachment has been removed from the issue. | Read-only |
permittedGroup: UserGroup | The group for which the attachment is visible.
If permittedGroup == null , the attachment is visible to the same group, as the issue it belongs to. | Read/write |
IssueTag Fields
The following fields are available for tags that are added to an issue. For tag-related methods, see hasTag, addTag, removeTag, getTag, and getSharedTag.
For tag-specific methods, see IssueTag.
Property | Description | State |
---|---|---|
name: string | The name of the tag. | Read-only |
owner: User | The user who is the owner of the tag. | Read-only |
SavedQuery Fields
The following fields are available for a saved search. For saved search-related methods, see SavedQuery.
Property | Description | State |
---|---|---|
name: string | The name of the saved search. | Read-only |
query: string | The search query stored in the saved search. | Read-only |
Project Fields
The following fields are available for projects. These properties are read-only. See also Projects.
There are additional operations that are available for project fields that store a sequence
.
For more information, see Methods and Operations.
Field | Description | State |
---|---|---|
shortName: string | The project ID. For example, YTF is the project ID for the YouTrack Feedback project. | Read-only |
name: string | The project name. For example, YouTrack Feedback . | Read-only |
description: string | The project description. Returns a null value when empty. | Read-only |
leader: User | The project leader. | Read-only |
issues: sequence<Issue> | A sequence of issues that belong to the project. | Read-only |
fields: sequence<ProjectField> | A sequence of project fields. See below for details. | Read-only |
ProjectField Fields
Project fields represent the list of all the custom fields that are attached to the project.
While the fields described in CustomField Fields relate to the values of the custom fields, these attributes and methods refer to the fields themselves.
The following field stores information for a ProjectField
object.
Field | Description |
---|---|
nullValueText: string | The empty value text. Returns a null value when not set. |
User Fields
Fields that store information for a User
can be referenced in the following contexts:
The following properties of a user account are stored in User
fields.
See also User-related Methods.
UserGroup Fields
The following properties of a group are stored in UserGroup
fields. These fields are read-only.
See also Group-related Methods.