Setting up Bitrix24 integration with YouTrack

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1177
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

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, field workItems) middleware creates time record in B24 task via task.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 via POST /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