Bitrix24 and YouTrack Integration Setup
Development team tracks tasks in YouTrack, commercial department in Bitrix24. Customer sends bug report, manager creates task in B24, then goes to YouTrack and creates a duplicate issue. When developer closes the issue, manager doesn't know — customer gets answer "still working" on an already fixed problem. Two trackers without connection — double work and constant information lag.
Synchronization architecture
Integration works through YouTrack REST API and B24 REST API. YouTrack provides full API for working with issues, projects, agile boards and time records. Middleware ensures bidirectional exchange.
B24 (task event) → Webhook → Middleware → YouTrack REST API → Issue
YouTrack (workflow/webhook) → Middleware → B24 REST API → Task
YouTrack supports two mechanisms to notify external systems: Webhooks (Settings → Webhooks) and Workflows (server-side JavaScript scripts). Webhooks are simpler, but workflows give more control — you can filter events by fields, projects and issue types.
Field mapping
| B24 field (tasks.task) | YouTrack field (issue) | Note |
|---|---|---|
| TITLE | summary | Direct match |
| DESCRIPTION | description | B24 HTML → YouTrack Markdown |
| RESPONSIBLE_ID | Assignee | Via user mapping table |
| CREATED_BY | Reporter | Similarly |
| DEADLINE | Due Date | ISO 8601 in both systems |
| PRIORITY | Priority | Map values (see below) |
| STATUS | State | Separate configuration |
| GROUP_ID | Project (shortName) | Correspondence table |
| UF_* (custom) | Custom fields | Individual |
Description conversion: B24 stores HTML, YouTrack uses Markdown (with extensions). Middleware converts via intermediate AST representation.
Status mapping
YouTrack uses state machine — each project has its own set of states. Middleware supports configurable mapping:
| B24 Status | YouTrack State | Direction |
|---|---|---|
| New (2) | Open | ↔ |
| In Progress (3) | In Progress | ↔ |
| Waiting for Verification (4) | To Verify | ↔ |
| Completed (5) | Fixed / Done | ↔ |
| On Hold (6) | Wait | ↔ |
| — | Duplicate | YT → B24 (comment) |
| — | Won't Fix | YT → B24 (close + comment) |
States not in B24 are handled specially: middleware adds explanatory comment and closes or pauses task.
Time tracking synchronization
Both YouTrack and B24 track spent time. Middleware combines records:
-
From YouTrack to B24: When work item added in YouTrack (event
issue.updated, fieldworkItems) middleware creates time record in B24 task viatask.elapseditem.add. Specifies duration, date and comment. -
From B24 to YouTrack: When time record added in B24 (event
ONTASKELAPSEDTIMEADD) middleware creates work item in YouTrack viaPOST /api/issues/{id}/timeTracking/workItems.
Important: middleware maintains time record mapping table to avoid duplication in bidirectional sync. Each record gets unique sync_id.
Agile board integration
YouTrack Agile Board displays issues on kanban/scrum board. B24 has its own Kanban. Middleware doesn't sync visual placement, but provides:
- Issue move on YouTrack board (State change) → update task status in B24 Kanban.
- Stage change on B24 Kanban board → update State of YouTrack issue.
- YouTrack Sprints → task groups or tags in B24 (via custom field
UF_SPRINT).
Loop prevention
Same principle as in other integrations: middleware marks update source in custom field of both systems. When webhook received, marker is checked — if middleware initiated update, processing is skipped.
Authentication
- YouTrack: Permanent Token (Profile → Authentication → New Token). For Cloud and Server — same mechanism. Scope set through rights of user issued the token.
-
B24: OAuth 2.0 with scope
task,user. - Data passes only through middleware — no direct access between systems.
What we implement
- Middleware for bidirectional sync of B24 tasks and YouTrack issues
- Configurable mapping of fields, statuses and priorities
- Work time tracking synchronization between systems
- YouTrack agile board integration with B24 Kanban
- Update loop protection
- User and project mapping between systems







