entities
Contains definitions for the entities in YouTrack that are accessible to workflows.
Types
This module supports the following object types:
Type | Description |
|---|---|
Represents VCS-related items such as commits and pull requests. | |
Represents an agile board and the set of sprints that belong to the board. | |
Entity type for App global extension properties | |
Represents an article in YouTrack. | |
Represents a file that is attached to an article. | |
Represents a comment that is added to an article or an article draft. | |
The base class for article. | |
The base class for article comment. | |
The base class for article comment. | |
The base class for issue comment. | |
The common ancestor for all entity types. | |
The base class for issue work items. | |
Represents a value that is stored in a custom field that stores a build type. | |
Represents a value-based condition for a custom field in a specific project. | |
Represents a custom field in a project that stores a predefined set of values. | |
Represents a group of business hours settings in a helpdesk project. In the Workflow API, such a group is called a Calendar. | |
Represents a group of 24x7 business hours settings in a helpdesk project. In the Workflow API, such a group is called a Calendar24x7. | |
An entity that retrieves VCS changes and creates their representation in YouTrack. | |
Represents a channel used by customers to reach out to the helpdesk for support. | |
Represents a value in a custom field that stores a predefined set of values. | |
Represents an online form used in a helpdesk project. Online forms provide customers with a web-based interface that they can use to submit inquiries, requests, or complaints. | |
Represents a value that is stored in a custom field. The custom fields themselves are represented by the Fields class. | |
Represents a value-based condition for a custom field in a specific project. | |
Represents a value-based condition for a custom field that stores references to users. | |
Represents the base entity for a value-based condition for a custom field in a project. | |
Represents the custom fields that are used in an issue. The actual set of custom fields that are used for each issue is configured on a per-project basis. The properties shown here correspond with the default custom fields in YouTrack. Additional custom fields that have been attached to a project are also available. | |
Represents a Gantt chart. | |
Represents a custom field in a project that stores a UserGroup type. | |
Represents an issue in YouTrack. The | |
Represents a file that is attached to an issue. | |
Represents a comment that is added to an issue. | |
Represents an issue link type. | |
Deprecated. Use Tag instead. | |
Represents a work item that has been added to an issue. | |
An object that enables traversal through the elements in a collection. | |
Configures an attachment to add to an article in workflows and apps. | |
Configures a comment to add to an article in workflows and apps. | |
Configures the data used to create an article in workflows and apps. | |
Configures an attachment to add to an issue in workflows and apps. | |
Configures a comment to add to an issue in workflows and apps. | |
Configures a work item to add to an issue in workflows and apps. | |
Configures an attachment to add to an issue comment in workflows and apps. | |
Configures the data used to create an issue in workflows and apps. | |
Configures an email notification to send to a user in workflows and apps. | |
Represents an email channel used in a helpdesk project. Email channels pull messages from an external mail service and process them according to the channel settings. | |
Represents a value in a custom field that has a user associated with it, a so-called owner. | |
Represents a custom field in a project that stores a value as a period type. We use org.joda.time.Period as a base class for period values. While you can read the class documentation at http://joda-time.sourceforge.net/apidocs/org/joda/time/Period.html, please note that we support only class members which use the Period class and primitive types like String and int. | |
Represents the common ancestor for all persistent files that are available in YouTrack. | |
Represents a YouTrack project. | |
Represents a custom field that is available in a project. | |
Represents a project team. To access a project team in a workflow, use the In rule requirements, reference a project team as a | |
Represents a classification that determines which basic features are available for use in a project. | |
Represents a value in a custom field that stores a version type. | |
Represents a pull or merge request that is attached to an issue. | |
Represents a pull request state. | |
A single element in a set of Requirements | |
The Before running the rule, YouTrack validates these declarations and exposes the resolved entities in the workflow context. | |
Represents a saved search. | |
The You can access single values in the collection directly (see | |
Represents a work days calendar in YouTrack. | |
Base class for custom fields that store simple values like strings and numbers. | |
Represents a sprint that is associated with an agile board. Each sprint can include issues from one or more projects. | |
Represents a value in a custom field that stores a state type. | |
Represents a tag. | |
Represents a custom field that stores a string of characters as text. When displayed in an issue, the text is shown as formatted in Markdown. | |
Represents a user account in YouTrack. | |
Represents the collection of custom attributes that have been added to user profiles. To retrieve a value that is stored in the profile for a referenced user, use the attribute name as the key. The entire object is read-only. | |
Represents a value-based condition for a custom field in a specific project, where the field stores references to a user. | |
Represents a group of users. | |
Represents a custom field in a project that stores values as a user type. | |
Represents a classification that defines access to advanced helpdesk features and are used to regulate the pricing associated with each user account in YouTrack. | |
Represents a commit that is attached to an issue. | |
Represents a VCS server. | |
Represents a common ancestor of classes that represent tags and saved searches. | |
Value of a work item attribute. | |
Represents the collection of custom attributes that have been declared for work items on a project level. To retrieve a value that is stored in an attribute for a referenced work item, use the attribute name as the key. | |
Work item attribute configured for the project. | |
Represents a work type that can be assigned to a work item. |
Functions
actionFunction
This function is called by different events depending on the rule type: when a change is applied to an issue (on-change rules), when a command is executed (action rules), or according to a predefined schedule (scheduled rules). This function is called separately for each related issue.
Parameters
Name | Type | Description |
|---|---|---|
ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe in the Requirements. |
Properties of ctx
Name | Type | Description |
|---|---|---|
issue | The current issue. | |
currentUser | The user who executes the rule. | |
isSilentOperation | Boolean | When Available since 2017.4.38771. |
invokeAsync | function | Schedules an async function to run after the current transaction commits. The async function must be declared in the Signature:
For project-level rules, this means the same rule-project pair. For global-level rules, this means the same rule-global configuration pair. The old call is deleted, and the new call starts with a fresh delay. Use this parameter to debounce repeated events so only the latest invocation runs. Available since 2026.2. |
store | function | Stores a value for use by subsequent async functions. Signature:
Stored values are available to subsequent async functions through Values are persisted only when the same execution schedules an async function or async HTTP call. If no async call is scheduled, the values are discarded. Available since 2026.2. |
load | function | Retrieves a value previously stored with Signature:
This method returns the stored value. Any entity references are automatically resolved back to their entity objects. This method is available only inside async functions. Available since 2026.2. |
Example
guardFunction
This function is called to determine whether an action function can be applied to an issue. Guard functions are used in on-change rules, action rules, and in transitions between values of a state-machine rule. On-schedule rules also support guard functions, but this rule type includes a search property that has a similar purpose.
Parameters
Name | Type | Description |
|---|---|---|
ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
Properties of ctx
Example
slaActionFunction
This function is called when the SLA policy needs to update a ticket. For example, it can pause the timers according to the SLA pausing settings, or it can resume the timers when there is a new comment from the customer. Only SLA policy scripts use this function.
Parameters
Name | Type | Description |
|---|---|---|
ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
Properties of ctx
Name | Type | Description |
|---|---|---|
issue | The current ticket. | |
currentUser | The user who makes updates after which the SLA policy will update the ticket. |
Example
slaBreachFunction
This function is called when one of the SLA goals is breached. Only SLA policy scripts use this function.
Parameters
Name | Type | Description |
|---|---|---|
ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
Properties of ctx
Name | Type | Description |
|---|---|---|
breachedField | Object | The timer custom field where the time goal has been breached for this ticket. |
issue | The current ticket. | |
currentUser | The special workflow user that is considered to be the actor for triggering this function. This is a system user account that is granted a full set of permissions. |
Example
slaEnterFunction
This function is called when the SLA policy starts applying to the ticket. For example, it initialises the timers according to the SLA settings. Only SLA policy scripts use this function.
Parameters
Name | Type | Description |
|---|---|---|
ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
Properties of ctx
Name | Type | Description |
|---|---|---|
issue | The current ticket. | |
currentUser | The user who makes updates after which the SLA policy will be applied to this ticket. |
Example
slaGuardFunction
This function is called to determine whether the SLA policy can be applied to a ticket. Only SLA policy scripts use this function.
Parameters
Name | Type | Description |
|---|---|---|
ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
Properties of ctx
Name | Type | Description |
|---|---|---|
issue | The current ticket. | |
currentUser | The user who makes updates after which the SLA policy will be applied to this ticket. |
Example