YouTrack Integration with PanDev Metrics
TL;DR. Create a permanent token in YouTrack, paste the YouTrack URL and the token into Settings → Integrations → YouTrack, and name branches with the issue ID — for example
feature/PROJ-123. Issues sync every 15 minutes; install the optional Workflow to get changes within seconds. Audience: admin.
Before you begin
- PanDev Metrics is up and running (Cloud workspace or on-prem instance)
- Admin access to your PanDev Metrics tenant
- A YouTrack user who can see the projects you want to track. For the optional Workflow — YouTrack administrator rights and YouTrack 2026.2 or later
Step 1 — Create a permanent token in YouTrack
- In YouTrack open your profile → Authentication → New permanent token.
- No scope selection is needed: the token has the permissions of the user who created it.
- Copy the token — it starts with
perm:.
:::warning Keep the token private The token acts as its user in YouTrack and never expires until you revoke it. Store it in a secrets manager. :::
PanDev Metrics sees the projects and issues that the token's user can see.
Step 2 — Connect YouTrack in PanDev Metrics
- Open Settings → Integrations → YouTrack.
- Turn on Enable integration with YouTrack.
- Fill in the form:
| Field | Value |
|---|---|
| YouTrack base URL | https://your-company.youtrack.cloud or the address of your self-hosted YouTrack |
| Permanent token | The perm:… value from Step 1 |
| Project ID (optional) | The project short name, for example PROJ, to collect only one project. Leave empty to cover all projects |
- Click Test connection.
- After a successful check, click Save.
To stop syncing, click Disconnect on the same screen.
Worklog
With Push worklog from PanDev to YouTrack on, time that PanDev Metrics logs for an issue (for example, from an IDE plugin) is added to the issue as a YouTrack work item.
Step 3 — Install the Workflow for instant updates (optional)
Without the Workflow, PanDev Metrics re-reads changed issues every 15 minutes. The Workflow makes YouTrack notify PanDev Metrics right after an issue changes, so updates arrive within seconds. It requires YouTrack 2026.2 or later — on older versions do not install it.
-
In PanDev Metrics, on the YouTrack screen, click Show Workflow instructions and then Copy script.
warningThe script contains a connection secret. Do not publish it.
-
In YouTrack open Administration → Workflows → New workflow → JavaScript Editor. Set a name and save.
-
Create an On-change module, replace the template with the copied script, and save.
-
On the Projects tab of the Workflow click Manage projects and select the projects of this PanDev Metrics department.
-
Turn on Auto-attach so new projects are connected automatically.
-
Check that the Workflow and its rule are active and show no "requires setup" error.
-
Change a test issue and check that the change appears in PanDev Metrics after a few seconds.
The script is tied to one PanDev Metrics department. If one YouTrack instance serves several departments, do not turn on Auto-attach: attach each department's Workflow only to its own projects.
Step 4 — Name branches with the issue ID
This is what links Git activity to YouTrack issues. Put the issue ID — the project short name, a dash and the number, as shown in YouTrack (PROJ-123) — anywhere in the branch name:
feature/PROJ-123
bugfix/PROJ-123-fix-login
PROJ-123
| Branch | Result |
|---|---|
feature/PROJ-123 | ✅ Linked to issue PROJ-123 |
feature/proj-123 | ✅ Linked — the letter case does not matter |
bugfix/PROJ-123-fix-login | ✅ Linked — text after the ID is allowed after -, _ or / |
feature/123 | ❌ Not linked — the project short name is missing |
feature/PROJ123 | ❌ Not linked — the dash is required |
feature/PROJ-1-PROJ-2 | ❌ Not linked when both issues exist — PanDev Metrics cannot choose. If only one of them exists, the branch links to it |
Branches that start with dependabot/ or renovate/ are never linked to issues.
PanDev Metrics finds the issue among the YouTrack issues it has already synced. If the branch appears before the issue is synced, the link is made as soon as the issue arrives.
Commits and merge requests on such branches still count toward coding time, but PanDev Metrics cannot attribute them to an issue, so per-issue analytics (Cycle Time, Lead Time, time per issue) stay empty for those issues.
Merge request titles
A merge request or pull request title in the Conventional Commits form also links to the issue when the ID is the scope: feat(PROJ-123): add login form. The title takes priority over the branch name.
Custom attribution rules
If your branches follow a different pattern, set your own regular expressions in Task Attribution. The first pair of parentheses must capture the whole issue ID — PROJ-123, not 123.
Verify
- Open a dashboard with a task-tracker widget and confirm that YouTrack issues appear and their states match YouTrack.
- Push a branch named
feature/followed by the ID of an existing issue and check that its activity shows up under that issue.
Troubleshooting
Connection fails
Check the base URL: it is the address of YouTrack itself, for example https://your-company.youtrack.cloud, without a path to a project or issue. Then check that the token starts with perm: and was not revoked.
Some issues do not appear
PanDev Metrics only sees the projects the token's user can open. If Project ID is set, only that project is collected — clear the field to cover all projects.
Changes appear only after about 15 minutes
The Workflow is not installed, not attached to the project, or YouTrack is older than 2026.2. Repeat Step 3 and check that the Workflow shows no "requires setup" error.
A branch does not link to the issue
Check the branch name against the table in Step 4: it must contain the full issue ID with the project short name.
Next steps
- Install the JetBrains plugin — capture IDE time per YouTrack issue
- Install the VS Code plugin — same for VS Code, Cursor, and Windsurf
- Connect GitLab — join commits and merge requests with YouTrack issues
Related
- How-to: Task Attribution
- How-to: Jira integration
- How-to: Linear integration
- How-to: Bitrix24 integration