YouTrack Standalone 7.0 Help

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.

/help/img/youtrack/7.0/workflowEditorFields_thumbnail.png

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.

FieldDescriptionState
reporter: UserThe user who reported the issue. For example, Assignee = reporter sets the user who reported the issue as the assignee.Read-only
created: dateThe date when the issue was created.Read-only
updated: dateThe date when the issue was last updated.Read-only
resolved: dateThe 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: UserGroupThe 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: ProjectThe project to which the issue is assigned.Read/write
summary: stringThe text that is entered as the issue summary.Read/write
description: stringThe text that is entered as the issue description.Read/write
votes: integerThe 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: integerThe 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.

FieldDescription
name: stringThe name that is assigned to the sprint.
description: stringThe description of the sprint.
ordinal: integerThe ordinal number that is assigned to the sprint. This number determines the order in which the sprint is displayed on the agile board.
archived: BooleanIs true if the sprint has been archived.
agile: AgileThe agile board that contains the sprint.

Agile Fields

The following fields are available for agile boards. These fields are read-only.

FieldDescription
name: stringThe 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.

FieldDescription
name: stringThe name of the custom field.
description: stringThe description of the custom field.
ordinal: integerThe 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 fields are available for custom fields with specific data types. These fields are read-only.

FieldField TypeDescription
colorIndex: integerEnumFieldThe index number of the color that is associated with this value.
isResolved: BooleanStateTrue if this particular value is regarded as resolved.
owner: UserOwnedFieldThe user who is the owner for this value. For example, the owner of a subsystem.
ordinal: integerOwnedField, EnumFieldThe index of the value in the field.
assembleDate: dateBuildThe date when this build was assembled.
releaseDate: dateVersionThe date when this version was released (can be null).
released: BooleanVersionTrue if this version is released.
archived: BooleanVersionTrue 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.

PropertyDescriptionState
issue: IssueThe issue to which the comment was added.Read-only
author: UserThe user who entered the comment.Read-only
created: dateThe date when the comment was added to the issue.Read-only
updated: dateThe date when the comment was last updated.Read-only
updatedBy: UserThe user who last updated the comment.Read-only
text: stringThe text that was entered as a comment.Read/write
permittedGroup: UserGroupThe 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.

FieldDescriptionState
issue: IssueThe issue to which the attachment was added.Read-only
author: UserThe user who added the attachment.Read-only
created: dateThe date when the attachment was added to the issue.Read-only
updated: dateThe date when the attachment was last updated.Read-only
name: stringThe filename of the attachment.Read-only
size: longThe size of the attachment in bytes.Read-only
extension: stringThe file extension of the attachment.Read-only
metaData: stringThe metadata properties of the attachment. For example, the dimensions of an image attachment.Read-only
removed: BooleanTrue when the attachment has been removed from the issue.Read-only
permittedGroup: UserGroupThe 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.

PropertyDescriptionState
name: stringThe name of the tag.Read-only
owner: UserThe 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.

PropertyDescriptionState
name: stringThe name of the saved search.Read-only
query: stringThe 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.

FieldDescriptionState
shortName: stringThe project ID. For example, YTF is the project ID for the YouTrack Feedback project.Read-only
name: stringThe project name. For example, YouTrack Feedback.Read-only
description: stringThe project description. Returns a null value when empty.Read-only
leader: UserThe 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.

FieldDescription
nullValueText: stringThe 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:

ContextDescription
loggedInUserThis keyword references the user who is currently logged in to YouTrack.
AssigneeThis default custom field is assigned a user data type. This means that you can return properties and use methods for a user account when you reference this custom field. The same guidelines apply for any custom field that is assigned a user data type.
issue.project.leaderThis property of a project is also assigned a user data type.
ownerA property of a custom field that uses the ownedField type. This property is assigned the user data type.
project.getUserThis method returns a specific user account in the context of the current project.
{user:[username]}References a specific user as a literal value.

The following properties of a user account are stored in User fields. See also User-related Methods.

FieldDescription
login: stringThe username of a user account. For example, root.
fullName: stringThe full name of a user. For example, John Smith.
email: stringThe email address of a user account. For example, j.smith@example.com.

UserGroup Fields

The following properties of a group are stored in UserGroup fields. These fields are read-only. See also Group-related Methods.

FieldDescription
name: stringThe name of a group.
description: stringThe description of a group. Returns a null value if a description has not been set for the group.
addNewUser: BooleanTrue if new users are added to this group automatically.
allUsersGroup: BooleanTrue if this is the All Users group.
Last modified: 2 February 2017