jira-sync
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJIRA Ticket Sync
JIRA工单同步
Sync current plan progress to JIRA ticket: $ARGUMENTS
If no argument provided, search for a ticket URL in the active plan file (most recently modified in ).
.mdplans/将当前计划进度同步至JIRA工单:$ARGUMENTS
若未提供参数,则在活动计划文件(目录下最近修改的文件)中搜索工单URL。
plans/.mdWorkflow
工作流程
Step 1: Identify Ticket and Context
步骤1:识别工单与上下文
- Parse ticket ID from or extract from the active plan file
$ARGUMENTS - Fetch current ticket state via JIRA MCP ()
mcp__atlassian__getJiraIssue - Determine current milestone by checking:
- Does a plan file exist? → Plan created
- Is there a working branch? → Implementation started
- Are tasks in progress? → Active implementation
- Is there an open PR? → PR ready for review
- Is the PR merged? → Complete
- 从中解析工单ID,或从活动计划文件中提取
$ARGUMENTS - 通过JIRA MCP()获取当前工单状态
mcp__atlassian__getJiraIssue - 通过以下方式确定当前里程碑:
- 是否存在计划文件?→ 计划已创建
- 是否有工作分支?→ 开发已启动
- 是否有任务在进行中?→ 开发进行中
- 是否有开放的PR?→ PR已准备好待评审
- PR是否已合并?→ 已完成
Step 2: Gather Update Content
步骤2:收集更新内容
Based on the current milestone:
| Milestone | Content to Post |
|---|---|
| Plan created | Plan summary, branch name, link to PR (if draft exists) |
| Implementation in progress | Task completion summary (X of Y tasks done), any blockers |
| PR ready | PR link, summary of changes, test results |
| PR merged | Final summary, suggest moving ticket to "Done" |
根据当前里程碑:
| 里程碑 | 需发布的内容 |
|---|---|
| 计划已创建 | 计划摘要、分支名称、PR链接(若草稿存在) |
| 开发进行中 | 任务完成摘要(Y项任务中已完成X项)、任何阻塞问题 |
| PR已准备好 | PR链接、变更摘要、测试结果 |
| PR已合并 | 最终摘要、建议将工单状态改为“完成” |
Step 3: Post Update
步骤3:发布更新
- Add a comment to the ticket with the gathered content via JIRA MCP
- Update ticket fields if applicable:
- Add branch name to a custom field or comment
- Add PR link to a custom field or comment
- Report what was synced to the user
- 通过JIRA MCP在工单中添加包含收集内容的评论
- 若适用,更新工单字段:
- 将分支名称添加至自定义字段或评论中
- 将PR链接添加至自定义字段或评论中
- 向用户报告已同步的内容
Step 4: Suggest Status Transition
步骤4:建议状态转换
Based on the milestone, suggest (but don't automatically perform) a status transition:
| Milestone | Suggested Status |
|---|---|
| Plan created | "In Progress" |
| PR ready | "In Review" |
| PR merged | "Done" |
根据里程碑,建议(但不自动执行)状态转换:
| 里程碑 | 建议状态 |
|---|---|
| 计划已创建 | “进行中” |
| PR已准备好 | “评审中” |
| PR已合并 | “完成” |
Important Notes
重要说明
- Never auto-transition ticket status — always suggest and let the user confirm
- Idempotent updates — running sync multiple times at the same milestone should not create duplicate comments
- Comment format — use JIRA markdown with clear headers and bullet points
- 切勿自动转换工单状态 — 始终先建议,再等待用户确认
- 幂等更新 — 在同一里程碑多次运行同步操作不应创建重复评论
- 评论格式 — 使用JIRA markdown,包含清晰的标题和项目符号
Execution
执行
Sync the ticket now.
立即同步工单。