---
schema: rendered-html/v1
title: "Context | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/context.html
generated_at: 2026-06-11T15:02:20.767319+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](context.html)
- 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
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Hub REST API

1. YouTrack Workflows
2. JavaScript Workflow Reference
3. [Context](#0)

# Context﻿

Last modified: 07 May 2026

Context contains several entities which may be useful during rule execution. Context is passed as an argument to `guard`, `action`, `onEnter` and `onExit` functions. It contains:

- An `issue`, which is an object of a current rule. Its origin varies depending on the rule type (see table below). If several issues become objects simultaneously, rules are executed for each issue separately in no specific order.
- A `currentUser`, who is a subject of the current rule. It also varies depending on the rule type (see table below).

  Note that the change initiator is inherited. If execution of a scheduled rule triggers an on-change rule, the `currentUser` for the on-change rule is inherited from the scheduled rule.

  > ### note
  >
  > Permission Delegation
  >
  > If your workflow updates private custom fields or adds new custom field values, YouTrack performs these changes even when the current user does not have the Update Issue Private Fields or the Update Project permissions.
  >
  > In this case, the project administrator who implements this workflow is delegating their permission to any user who triggers this workflow rule.
- All entities that are defined in Requirements.

| Rule type | Issue | User |
| --- | --- | --- |
| On-change | The issue which is changed | The user who initiated this change |
| Scheduled | The issue which matches the search criteria | A dedicated Workflow User (a system user with a full set of permissions) |
| Action | The issue on which a corresponding command is executed | The user who executed the command |
| State machine - instant actions | The issue where the controlled field is changed | The user who changed the value of the controlled field |
| State machine - `after` actions | The issue where the value of the controlled field is equal to the value specified for the action | A dedicated Workflow User (a system user with a full set of permissions) |

Rule-specific PropertiesRequirements

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

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