---
schema: rendered-html/v1
title: "entities | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/v1-entities.html
generated_at: 2026-06-11T15:20:33.410633+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- JavaScript Workflow Quick Start Guide
- Create a Workflow
- Edit a Workflow
- Workflow Rule Types
- Transactions
- Use Cases for Workflows
- Web-based Workflow Editor
- Using an External Code Editor
- Default Workflows
- Custom Workflow Repository
- JavaScript Workflow Reference
- Rule-specific Properties
- Context
- Requirements
- Using the Workflow API
- Building Integrations with Slack
- Using REST API Methods in JavaScript Workflows
- Working with Dates and Times
- Working with Periods
- Localized Workflow Messages
- Troubleshooting Workflows
- Remote Debugger
- YouTrack Workflow API
- Change Log
- [date-time](jetbrains__com__help__youtrack__devportal__v1-date-time.md)
- [entities](v1-entities.html)
- AbstractVcsItem
- Agile
- AppGlobalStorage
- Article
- ArticleAttachment
- ArticleComment
- BaseArticle
- BaseArticleAttachment
- BaseArticleComment
- BaseComment
- BaseEntity
- BaseWorkItem
- Build
- BundleElementCondition
- BundleProjectCustomField
- Calendar
- Calendar24x7
- ChangesProcessor
- Channel
- EnumField
- FeedbackForm
- Field
- FieldBasedBundleValuesCondition
- FieldBasedUserValuesCondition
- FieldBasedValuesCondition
- Fields
- Gantt
- GroupProjectCustomField
- Issue
- IssueAttachment
- IssueComment
- IssueLinkPrototype
- IssueTag
- IssueWorkItem
- Iterator
- JsonForArticleAddAttachment
- JsonForArticleAddComment
- JsonForArticleConstructor
- JsonForIssueAddAttachment
- JsonForIssueAddComment
- JsonForIssueAddWorkItem
- JsonForIssueCommentAddAttachment
- JsonForIssueConstructor
- JsonForUserNotify
- MailboxChannel
- OwnedField
- PeriodProjectCustomField
- PersistentFile
- Project
- ProjectCustomField
- ProjectTeam
- ProjectType
- ProjectVersion
- PullRequest
- PullRequestState
- Requirement
- Requirements
- SavedQuery
- Set
- SimpleCalendar
- SimpleProjectCustomField
- Sprint
- State
- Tag
- TextProjectCustomField
- User
- UserAttributes
- UserCondition
- [UserGroup](jetbrains__com__help__youtrack__devportal__v1-usergroup.md)
- [UserProjectCustomField](jetbrains__com__help__youtrack__devportal__v1-userprojectcustomfield.md)
- [UserType](jetbrains__com__help__youtrack__devportal__v1-usertype.md)
- [VcsChange](jetbrains__com__help__youtrack__devportal__v1-vcschange.md)
- [VcsServer](jetbrains__com__help__youtrack__devportal__v1-vcsserver.md)
- [WatchFolder](jetbrains__com__help__youtrack__devportal__v1-watchfolder.md)
- [WorkItemAttributeValue](jetbrains__com__help__youtrack__devportal__v1-workitemattributevalue.md)
- [WorkItemAttributes](jetbrains__com__help__youtrack__devportal__v1-workitemattributes.md)
- [WorkItemProjectAttribute](jetbrains__com__help__youtrack__devportal__v1-workitemprojectattribute.md)
- [WorkItemType](jetbrains__com__help__youtrack__devportal__v1-workitemtype.md)
- http
- license
- notifications
- search
- strings
- workflow
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Hub REST API

1. YouTrack Workflows
2. JavaScript Workflow Reference
3. YouTrack Workflow API
4. [entities](#0)

# entities﻿

Last modified: 14 May 2026

Contains definitions for the entities in YouTrack that are accessible to workflows.

## Types﻿

This module supports the following object types:

| Type | Description |
| AbstractVcsItem | Represents VCS-related items such as commits and pull requests. |
| Agile | Represents an agile board and the set of sprints that belong to the board. |
| AppGlobalStorage | Entity type for App global extension properties |
| Article | Represents an article in YouTrack. |
| ArticleAttachment | Represents a file that is attached to an article. |
| ArticleComment | Represents a comment that is added to an article. |
| BaseArticle | The base class for article. |
| BaseArticleAttachment | The base class for article comment. |
| BaseArticleComment | The base class for article comment. |
| BaseComment | The base class for issue comment. |
| BaseEntity | The common ancestor for all entity types. |
| BaseWorkItem | The base class for issue work items. |
| Build | Represents a value that is stored in a custom field that stores a build type. |
| BundleElementCondition | Represents a value-based condition for a custom field in a specific project. |
| BundleProjectCustomField | Represents a custom field in a project that stores a predefined set of values. |
| Calendar | Represents a group of business hours settings in a helpdesk project. In the Workflow API, such a group is called a Calendar. |
| Calendar24x7 | Represents a group of 24x7 business hours settings in a helpdesk project. In the Workflow API, such a group is called a Calendar24x7. |
| ChangesProcessor | An entity that retrieves VCS changes and creates their representation in YouTrack. |
| Channel | Represents a channel used by customers to reach out to the helpdesk for support. |
| EnumField | Represents a value in a custom field that stores a predefined set of values. |
| FeedbackForm | 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. |
| Field | Represents a value that is stored in a custom field. The custom fields themselves are represented by the Fields class. |
| FieldBasedBundleValuesCondition | Represents a value-based condition for a custom field in a specific project. |
| FieldBasedUserValuesCondition | Represents a value-based condition for a custom field that stores references to users. |
| FieldBasedValuesCondition | Represents the base entity for a value-based condition for a custom field in a project. |
| Fields | 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. |
| Gantt | Represents a Gantt chart. |
| GroupProjectCustomField | Represents a custom field in a project that stores a UserGroup type. |
| Issue | Represents an issue in YouTrack. |
| IssueAttachment | Represents a file that is attached to an issue. |
| IssueComment | Represents a comment that is added to an issue. |
| IssueLinkPrototype | Represents an issue link type. |
| IssueTag | Deprecated. Use Tag instead. |
| IssueWorkItem | Represents a work item that has been added to an issue. |
| Iterator | An object that enables traversal through the elements in a collection. |
| JsonForArticleAddAttachment |  |
| JsonForArticleAddComment |  |
| JsonForArticleConstructor |  |
| JsonForIssueAddAttachment |  |
| JsonForIssueAddComment |  |
| JsonForIssueAddWorkItem |  |
| JsonForIssueCommentAddAttachment |  |
| JsonForIssueConstructor |  |
| JsonForUserNotify |  |
| MailboxChannel | 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. |
| OwnedField | Represents a value in a custom field that has a user associated with it, a so-called owner. |
| PeriodProjectCustomField | 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. |
| PersistentFile | Represents the common ancestor for all persistent files that are available in YouTrack. |
| Project | Represents a YouTrack project. |
| ProjectCustomField | Represents a custom field that is available in a project. |
| ProjectTeam | Represents a project team. To access a project team in a workflow, use the `team` property of a `Project` object, such as `ctx.issue.project.team`, or the `teams` property of a `User` object. In rule requirements, reference a project team as a `UserGroup` by name. |
| ProjectType | Represents a classification that determines which basic features are available for use in a project. |
| ProjectVersion | Represents a value in a custom field that stores a version type. |
| PullRequest | Represents a pull or merge request that is attached to an issue. |
| PullRequestState | Represents a pull request state. |
| Requirement | A single element in a set of Requirements |
| Requirements | The `Requirements` object serves two purposes. First, it functions as a safety net. It specifies the set of entities that must exist for a rule to work as expected. Whenever one or more rule requirements are not met, corresponding errors are shown in the workflow administration UI. The rule is not executed until all of the problems are fixed. Second, it functions as a reference. Each entity in the requirements is plugged into the `context` object, so you can reference entities from inside your context-dependent functions (like an `action` function). There are two types of requirements: project-wide and system-wide. Project-wide requirements contain a list of custom fields that must be attached to each project that uses the rule as well as the required values from the sets of values for each custom field. System-wide requirements contain a list of other entities that must be available in YouTrack. This includes users, groups, projects, issues, tags, saved searches, and issue link types. |
| SavedQuery | Represents a saved search. |
| Set | The `Set` object stores unique values of any type, whether primitive values or object references. The Set is used as storage for all multi-value objects in this API: custom fields that store multiple values, issue links, issues in a project, and so on. You can access single values in the collection directly (see first(), last(), get(index)), use an iterator (see entries(), values()), or traverse with forEach(visitor) and find(predicate) methods. The workflow API is based on ECMAScript 5.1. This Set implementation mimics the functionality supported by the [ES 6 Set interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). |
| SimpleCalendar | Represents a work days calendar in YouTrack. |
| SimpleProjectCustomField | Base class for custom fields that store simple values like strings and numbers. |
| Sprint | Represents a sprint that is associated with an agile board. Each sprint can include issues from one or more projects. |
| State | Represents a value in a custom field that stores a state type. |
| Tag | Represents a tag. |
| TextProjectCustomField | 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. |
| User | Represents a user account in YouTrack. |
| UserAttributes | 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. |
| UserCondition | Represents a value-based condition for a custom field in a specific project, where the field stores references to a user. |
| [UserGroup](jetbrains__com__help__youtrack__devportal__v1-usergroup.md) | Represents a group of users. |
| [UserProjectCustomField](jetbrains__com__help__youtrack__devportal__v1-userprojectcustomfield.md) | Represents a custom field in a project that stores values as a user type. |
| [UserType](jetbrains__com__help__youtrack__devportal__v1-usertype.md) | Represents a classification that defines access to advanced helpdesk features and are used to regulate the pricing associated with each user account in YouTrack. |
| [VcsChange](jetbrains__com__help__youtrack__devportal__v1-vcschange.md) | Represents a commit that is attached to an issue. |
| [VcsServer](jetbrains__com__help__youtrack__devportal__v1-vcsserver.md) | Represents a VCS server. |
| [WatchFolder](jetbrains__com__help__youtrack__devportal__v1-watchfolder.md) | Represents a common ancestor of classes that represent tags and saved searches. |
| [WorkItemAttributeValue](jetbrains__com__help__youtrack__devportal__v1-workitemattributevalue.md) | Value of a work item attribute. |
| [WorkItemAttributes](jetbrains__com__help__youtrack__devportal__v1-workitemattributes.md) | 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. |
| [WorkItemProjectAttribute](jetbrains__com__help__youtrack__devportal__v1-workitemprojectattribute.md) | Work item attribute configured for the project. |
| [WorkItemType](jetbrains__com__help__youtrack__devportal__v1-workitemtype.md) | Represents a work type that can be assigned to a work item. |

## Functions﻿

### actionFunction﻿

```
actionFunction(ctx, ctx.issue, ctx.currentUser, ctx.isSilentOperation, ctx.invokeAsync, ctx.store, ctx.load)
```

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**

| --- | --- | --- |
| ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe in the Requirements. |
| ctx.issue | Issue | The current issue. |
| ctx.currentUser | User | The user who executes the rule. |
| ctx.isSilentOperation | Boolean | When `true`, the rule is triggered in reaction to a command that is applied without notification. When `false`, the rule is triggered in reaction to a command that is applied normally. Available since 2017.4.38771. |
| ctx.invokeAsync | function | Schedules an async function for execution after the current transaction commits. The async function must be declared in the `asyncFunctions` block of the rule or AI tool. Signature: `ctx.invokeAsync(functionName, delay, deduplicationKey)`. `functionName` is required (string, must match a key in `asyncFunctions`). `delay` is optional (number, milliseconds, default 0, max 7 days). `deduplicationKey` is optional (string). When provided, any previously scheduled async call with the same key and the same rule-project combination is replaced — the old call is deleted and the new one is scheduled with a fresh delay. The key is scoped per entry configuration (rule + project pair for project-level rules, or rule + global configuration for global-level rules). This enables debounce patterns where only the latest invocation should execute. |
| ctx.store | function | Persists a value across async boundaries. Signature: `ctx.store(key, value)`. The key is a string identifier. The value can be a primitive (string, number, boolean), null, or an entity reference (e.g. an Issue or User). Stored values are available in subsequent async functions via `ctx.load(key)`. Values are only persisted when an async function or async HTTP call is scheduled in the same execution; if neither `ctx.invokeAsync()` nor an async HTTP call is made, stored values are discarded. |
| ctx.load | function | Retrieves a value previously stored with `ctx.store(key, value)`. Signature: `ctx.load(key)`. Returns the stored value, with entity references automatically resolved back to their entity objects. Only available inside async functions. |

**Example**

```
action: function(ctx) {
  console.log('Action for issue ' + ctx.issue.id);
}
```

### guardFunction﻿

```
guardFunction(ctx, ctx.issue, ctx.currentUser)
```

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**

| --- | --- | --- |
| ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
| ctx.issue | Issue | The current issue. |
| ctx.currentUser | User | The user who executes the rule. |

**Example**

```
guard: function(ctx) {
  return ctx.issue.State.isResolved;
}
```

### slaActionFunction﻿

```
slaActionFunction(ctx, ctx.issue, ctx.currentUser)
```

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**

| --- | --- | --- |
| ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
| ctx.issue | Issue | The current ticket. |
| ctx.currentUser | User | The user who makes updates after which the SLA policy will update the ticket. |

**Example**

```
action: (ctx) => {
  console.log('action', ctx.issue.id);
}
```

### slaBreachFunction﻿

```
slaBreachFunction(ctx, ctx.breachedField, ctx.issue, ctx.currentUser)
```

This function is called when one of the SLA goals is breached. Only SLA policy scripts use this function.

**Parameters**

| --- | --- | --- |
| ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
| ctx.breachedField | Object | The timer custom field where the time goal has been breached for this ticket. |
| ctx.issue | Issue | The current ticket. |
| ctx.currentUser | User | 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**

```
onBreach: (ctx) => {
  console.log('onBreach', ctx.issue.id, ctx.breachedField);
}
```

### slaEnterFunction﻿

```
slaEnterFunction(ctx, ctx.issue, ctx.currentUser)
```

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**

| --- | --- | --- |
| ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
| ctx.issue | Issue | The current ticket. |
| ctx.currentUser | User | The user who makes updates after which the SLA policy will be applied to this ticket. |

**Example**

```
onEnter: (ctx) => {
  console.log('onEnter', ctx.issue.id);
}
```

### slaGuardFunction﻿

```
slaGuardFunction(ctx, ctx.issue, ctx.currentUser)
```

This function is called to determine whether the SLA policy can be applied to a ticket. Only SLA policy scripts use this function.

**Parameters**

| --- | --- | --- |
| ctx | Object | The execution context. Along with the parameters listed below, the context also contains objects that you describe as Requirements. |
| ctx.issue | Issue | The current ticket. |
| ctx.currentUser | User | The user who makes updates after which the SLA policy will be applied to this ticket. |

**Example**

```
guard: (ctx) => {
  return false;
}
```

- [entities](/help/youtrack/devportal/v1-entities.html)
- [Types](/help/youtrack/devportal/v1-entities.html#types)
- [Functions](/help/youtrack/devportal/v1-entities.html#functions)
- [actionFunction](/help/youtrack/devportal/v1-entities.html#actionFunction)
- [guardFunction](/help/youtrack/devportal/v1-entities.html#guardFunction)
- [slaActionFunction](/help/youtrack/devportal/v1-entities.html#slaActionFunction)
- [slaBreachFunction](/help/youtrack/devportal/v1-entities.html#slaBreachFunction)
- [slaEnterFunction](/help/youtrack/devportal/v1-entities.html#slaEnterFunction)
- [slaGuardFunction](/help/youtrack/devportal/v1-entities.html#slaGuardFunction)

[date-time](jetbrains__com__help__youtrack__devportal__v1-date-time.md)AbstractVcsItem

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.
