## Jira/JSM Ticket Systems and Projects

This document describes how ticket projects are organized across Global Support and CBG Support, and how those projects relate to this repository.

## Glossary

- JSM (Jira Service Management): Atlassian service desk product used for customer-facing ticket handling before escalation.
- Jira: Atlassian issue tracking product used for internal collaboration, especially after escalation to OnCall.
- Support Engineering (SE/L1): Level 1 support team.
- Support Escalation Engineering (SEE/L2): Level 2 support escalation team.
- OnCall Engineering (L3): Development-side on-call responders (also called fire brigade).
- Global Support (GS): SE + SEE.
- Self-Managed (On-Premises): Customer-managed TiDB deployment model.
- Cloud: SaaS deployment model.
- CBG: China Business Group.
- Global: Regions outside CBG.

## Four Core Dimensions

1. Customer-facing vs internal systems:
   - Customer communication happens in JSM projects.
   - OnCall collaboration happens in Jira projects.
2. Ticket source (Global vs CBG):
   - Global and CBG systems are physically isolated for compliance.
3. Customer deployment model (Self-Managed vs Cloud):
   - Tickets are typically split into different projects by deployment model.
4. Internal system deployment model (Cloud vs On-Premises):
   - Deployment region and mode follow compliance requirements.

## Global Systems and Projects

- Global customer ticket system (JSM): `tidb.atlassian.net` (Atlassian SaaS, North America).
- Global internal OnCall system (Jira): used by GS and OnCall after escalation.

Common Global customer-facing projects (JSM):
- TiDB-Cloud-Ticket: Main TiDB Cloud support project.
- Rapid-ticket: Fast path for selected key customers.
- NA-Ticket: Self-Managed tickets for North America customers.
- APAC-Ticket: Self-Managed tickets for APAC customers.
- JP-Ticket: Self-Managed tickets for Japan customers.
- TiDB-Cloud-Account/Billing: TiDB Cloud account and billing support.

Common Global internal OnCall projects (Jira):
- GTOC (Global TiDB OnCall): OnCall tickets for Self-Managed environments.
- TCOC (TiDBCloud-OnCall): OnCall tickets for TiDB Cloud environments.

## CBG Systems

- CBG customer ticket system (JSM): `support.pingcap.cn` (on-premises, China).
- CBG internal OnCall system (Jira): `internal.pingcap.net` (on-premises, China).
- Current scope: CBG tickets are Self-Managed only (no TiDB Cloud tickets yet).

## Workflow and Synchronization

- Before escalation, tickets are handled in JSM.
- After escalation, communication and analysis with OnCall move to Jira.
- Global JSM and Global Jira currently do not have built-in issue synchronization.
- Escalation requires manual issue creation and manual data copy (text and attachments).
- Mapping is tracked through the `TICKET issue key` field in GTOC/TCOC issues.

## Scope in This Repository

This pipeline currently focuses on these project keys:
- ST
- TCOC
- FRM
- APID
- TCID

If new project keys are added, update fetch/sync project configuration and converter mapping accordingly.
