关于 triage-issue
triage-issue 是面向 Jira 用户的缺陷分流技能,可搜索重复和相关问题,并结合历史修复信息辅助判断。它会先呈现搜索结果,再根据用户决定为现有问题添加评论或创建结构化缺陷单。
主要功能
- 01多角度搜索 Jira 缺陷
- 02判断重复、相关或新问题
- 03查找已解决问题的修复背景
- 04经用户确认后添加评论或建单
适用场景
- 01检查错误报告是否已有重复问题
- 02利用历史缺陷及修复信息评估回归
- 03将新缺陷整理为 Jira 问题
- 04为现有问题补充错误和环境信息
MCP 相关
该技能通过 Jira 工具搜索和读取问题,并可在用户决定后添加评论或创建问题。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ atlassian/ atlassian-mcp-server --skill triage-issue安装后在 Claude Code 中输入/triage-issue确认已加载。
附带文件references/bug-report-templates.mdreferences/search-patterns.md
详细介绍
问题分流
关键词
分流 Bug,检查重复项,这是否是重复问题,搜索类似问题,创建 Bug 工单,提交 Bug,报告此错误,分流此错误,Bug 报告,错误消息,类似问题,重复 Bug,谁修复了此问题,是否有人报告过此问题,搜索 Bug,查找类似 Bug,创建问题,提交问题
概述
通过在 Jira 中搜索重复项、识别过去的类似问题,并帮助创建结构完善的 Bug 工单或为现有问题补充上下文,自动分流 Bug 报告和错误消息。此技能可省去手动检查重复项的工作,并确保 Bug 得到妥善记录,附有相关的历史背景。
在以下情况使用此技能: 用户需要对错误消息、Bug 报告或问题进行分流,以确定它们是否重复,并采取适当的措施。
工作流
按照以下 6 个步骤有效地分流问题:
步骤 1:提取关键信息
分析 Bug 报告或错误消息,确定搜索词。
提取以下要素:
错误特征:
- 错误类型或异常名称(例如,“NullPointerException”、“TimeoutError”)
- 错误代码或状态(例如,“500”、“404”、“ERR_CONNECTION_REFUSED”)
- 具体错误消息文本(关键短语,而非完整堆栈跟踪)
上下文:
- 受影响的组件或系统(例如,“身份验证”、“支付网关”、“API”)
- 环境(例如,“生产环境”、“预发布环境”、“移动应用”)
- 导致错误的用户操作(例如,“登录时”、“上传文件时”)
症状:
- 可观察到的行为(例如,“页面空白”、“无限加载”、“数据未保存”)
- 影响(例如,“用户无法登录”、“支付失败”)
提取示例:
输入:“用户在移动应用中尝试登录时收到‘Connection timeout’错误” 提取结果:
- 错误:“Connection timeout”
- 组件:“login”、“mobile app”
- 症状:“无法登录”
输入:“PaymentProcessor.processRefund() 第 245 行出现 NullPointerException” 提取结果:
- 错误:“NullPointerException”
- 组件:“PaymentProcessor”、“refund”
- 位置:“processRefund 第 245 行”
步骤 2:搜索重复项
使用提取的关键词在 Jira 中搜索,查找类似或重复的问题。
搜索策略:
执行多次有针对性的搜索,以发现措辞不同的重复问题:
搜索 1:侧重错误
searchJiraIssuesUsingJql(
cloudId="...",
jql='project = "PROJ" AND (text ~ "error signature" OR summary ~ "error signature") AND type = Bug ORDER BY created DESC',
fields=["summary", "description", "status", "resolution", "created", "updated", "assignee"],
maxResults=20
)
搜索 2:侧重组件
searchJiraIssuesUsingJql(
cloudId="...",
jql='project = "PROJ" AND text ~ "component keywords" AND type = Bug ORDER BY updated DESC',
fields=["summary", "description", "status", "resolution", "created", "updated", "assignee"],
maxResults=20
)
搜索 3:侧重症状
searchJiraIssuesUsingJql(
cloudId="...",
jql='project = "PROJ" AND summary ~ "symptom keywords" AND type = Bug ORDER BY priority DESC, updated DESC',
fields=["summary", "description", "status", "resolution", "created", "updated", "assignee"],
maxResults=20
)
搜索提示:
仅使用关键词:
- ✅ “timeout login mobile”
- ✅ “NullPointerException PaymentProcessor refund”
- ❌ “用户在……时收到连接超时错误”(过于冗长)
优先搜索近期问题:
- 按
created DESC或updated DESC排序,以查找近期的类似问题 - 近期 Bug 更可能是相关的重复问题
不要过度筛选:
- 包含已解决的问题(它们可能已重新打开,或问题再次出现)
- 搜索所有 Bug 状态,以查找修复历史
步骤 3:分析搜索结果
评估搜索结果,确定这是重复问题还是新问题。
重复问题检测:
高度确信为重复问题(>90%):
- 摘要或描述中有完全相同的错误消息
- 组件相同,且错误类型相同
- 近期问题(< 30 天),症状完全相同
- 操作: 强烈建议在现有问题中添加评论
很可能是重复问题(70-90%):
- 错误相似,但存在细微差异
- 组件相同,但上下文不同
- 根本原因相同的已解决问题
- 操作: 将其列为可能的重复问题,让用户决定
可能相关(40-70%):
- 症状相似,但错误不同
- 组件领域相同,但具体错误不同
- 较早的问题(> 6 个月),可能无关
- 操作: 提及其可能相关
很可能是新问题(<40%):
- 未找到类似问题
- 错误特征和组件不同
- 症状或上下文独特
- 操作: 建议创建新问题
检查修复历史:
如果发现类似的已解决问题:
提取相关信息:
- 谁修复了问题?(已解决问题的经办人)
- 如何修复的?(解决评论或关联的 PR)
- 何时修复的?(解决日期)
- 是否再次出现?(是否有重新打开的问题)
提供此背景信息,帮助做出分类处理决定。
第 4 步:向用户呈现调查结果
重要: 始终先呈现调查结果,并等待用户决定后再采取任何行动。
可能重复的问题格式:
🔍 **Triage Results: Likely Duplicate**
I found a very similar issue already reported:
**PROJ-456** - Connection timeout during mobile login
Status: Open | Priority: High | Created: 3 days ago
Assignee: @john.doe
https://yoursite.atlassian.net/browse/PROJ-456
**Similarity:**
- Same error: "Connection timeout"
- Same component: Mobile app login
- Same symptoms: Users unable to login
**Difference:**
- Original report mentioned iOS specifically, this report doesn't specify platform
**Recommendation:** Add your details as a comment to PROJ-456
Would you like me to:
1. Add a comment to PROJ-456 with your error details
2. Create a new issue anyway (if you think this is different)
3. Show me more details about PROJ-456 first
可能相关的问题格式:
🔍 **Triage Results: Possibly Related Issues Found**
I found 2 potentially related issues:
**1. PROJ-789** - Mobile app authentication failures
Status: Resolved | Fixed: 2 weeks ago | Fixed by: @jane.smith
https://yoursite.atlassian.net/browse/PROJ-789
**2. PROJ-234** - Login timeout on slow connections
Status: Open | Priority: Medium | Created: 1 month ago
https://yoursite.atlassian.net/browse/PROJ-234
**Assessment:** Your error seems related but has unique aspects
**Recommendation:** Create a new issue, but reference these related tickets
Would you like me to create a new bug ticket?
无重复问题的格式:
🔍 **Triage Results: No Duplicates Found**
I searched Jira for:
- "Connection timeout" errors
- Mobile login issues
- Authentication failures
No similar open or recent issues found.
**Recommendation:** Create a new bug ticket
**Note:** I found 1 old resolved issue (PROJ-123 from 8 months ago) about login timeouts, but it was for web, not mobile, and was resolved as "configuration error."
Would you like me to create a new bug ticket for this issue?
第 5 步:执行用户的决定
根据用户的选择,添加评论或创建新问题。
选项 A:向现有问题添加评论
如果用户希望补充到现有问题:
先获取完整的问题内容,以了解背景:
getJiraIssue(
cloudId="...",
issueIdOrKey="PROJ-456"
)
然后添加评论:
addOrEditJiraIssueComment(
cloudId="...",
issueIdOrKey="PROJ-456",
commentBody="[formatted comment - see below]"
)
评论结构:
## Additional Instance Reported
**Reporter:** [User's name or context]
**Date:** [Current date]
**Error Details:**
[Paste relevant error message or stack trace]
**Context:**
- Environment: [e.g., Production, iOS 16.5]
- User Impact: [e.g., 50+ users affected in last hour]
- Steps to Reproduce: [if provided]
**Additional Notes:**
[Any unique aspects of this instance]
---
*Added via triage automation*
选项 B:创建新问题
如果用户希望创建新问题:
首先,检查可用的问题类型。 listJiraProjectIssueTypesMetadata 不是主要工具,
因此请通过 execute 运行(参见调用非主要工具):
executeRead( # or execute(...) if your client exposes a single execute tool
name="listJiraProjectIssueTypesMetadata",
cloudId="...",
inputs={"projectIdOrKey": "PROJ"}
)
确定合适的问题类型:
- 对于 Bug/错误 → 使用 "Bug"(如果可用)
- 对于没有错误的问题 → 使用 "Task" 或 "Issue"
- 备选 → 选择第一个可用的非 Epic、非 Subtask 类型
创建问题:
createJiraIssue(
cloudId="...",
projectKey="PROJ",
issueType="Bug",
summary="[Clear, specific summary - see below]",
description="[Detailed description - see below]",
priority="Medium" # Adjust based on the severity assessment
)
摘要格式:
采用以下格式:[Component] [Error Type] - [Brief Symptom]
示例:
- ✅ "Mobile Login: Connection timeout during authentication"
- ✅ "Payment API: NullPointerException in refund processing"
- ✅ "Dashboard: Infinite loading on reports page"
- ❌ "Error in production"(过于笼统)
- ❌ "Users experiencing issues"(不够具体)
描述结构:
## Issue Description
[1-2 sentence summary of the problem]
## Error Details
[错误消息或堆栈跟踪]
## Environment
- **Platform:** [e.g., Mobile iOS, Web, API]
- **Version:** [if known]
- **Environment:** [Production/Staging/etc]
## Steps to Reproduce
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Expected Behavior
[What should happen]
## Actual Behavior
[What actually happens]
## User Impact
- **Frequency:** [e.g., Every time, Intermittent]
- **Affected Users:** [e.g., All users, Mobile users only]
- **Severity:** [e.g., Users cannot complete checkout]
## Additional Context
[Any other relevant information]
## Related Issues
[If applicable, reference similar issues found during triage]
- See also: PROJ-123 (similar but resolved)
---
*Created via automated triage*
第 6 步:提供摘要
采取行动后,确认已完成的操作。
如果已添加评论:
✅ **Comment Added Successfully**
Added details to existing issue: **PROJ-456**
https://yoursite.atlassian.net/browse/PROJ-456
**What I included:**
- Your error details
- Environment context
- User impact information
**Next Steps:**
- The assignee (@john.doe) will be notified
- Monitor PROJ-456 for updates
- If this turns out to be different, we can still create a separate ticket
如果已创建新问题:
✅ **New Issue Created**
**PROJ-890** - Mobile Login: Connection timeout during authentication
https://yoursite.atlassian.net/browse/PROJ-890
Type: Bug | Priority: Medium | Status: Open
**What's Included:**
- Complete error details and stack trace
- Environment and reproduction steps
- User impact assessment
- References to related issues (PROJ-123, PROJ-789)
**Next Steps:**
- Issue will be reviewed during next triage meeting
- Consider setting priority based on user impact
- Assign to appropriate team member
边缘情况与故障排除
多个可能重复的问题
如果发现 3 个或更多非常相似的问题:
🔍 **Triage Results: Multiple Possible Duplicates**
I found 3 issues that might be related:
**Most Likely Duplicate:**
**PROJ-456** - [summary] (Open, 2 days ago)
Match: 95% - Same error and component
**Also Possibly Related:**
**PROJ-234** - [summary] (Open, 1 month ago)
Match: 70% - Similar symptoms, different error
**PROJ-123** - [summary] (Resolved, 8 months ago)
Match: 60% - Related component, but was fixed
**Recommendation:**
1. Add to PROJ-456 (most similar)
2. Reference PROJ-234 in your comment (might be related)
3. Note PROJ-123 was previously fixed (possible regression)
Which issue should I add your details to? (Or create new)
项目背景不明确
如果用户未指定项目:
Which Jira project should I search for similar issues?
Available projects:
- BACKEND (Backend Services)
- MOBILE (Mobile Apps)
- WEB (Web Platform)
- INFRA (Infrastructure)
Or tell me the project key directly (e.g., BACKEND, MOBILE)
信息不足
如果 Bug 报告缺少关键信息:
I need more information to effectively triage this issue:
**What I have:**
- Error: "Something went wrong"
**What would help:**
- Specific error message or code
- Which part of the system (login, payment, etc.)
- What the user was trying to do
- Which environment (production, staging, mobile, web)
Can you provide any of these details?
已解决问题再次出现
如果发现匹配的已解决问题:
🔍 **Triage Results: Possible Regression**
This looks like it might be a regression of a previously fixed issue:
**PROJ-567** - [Same issue description]
Status: Resolved (Fixed) | Fixed: 3 months ago | Fixed by: @jane.smith
Resolution: [Brief description of fix]
https://yoursite.atlassian.net/browse/PROJ-567
**This suggests:**
- The original fix may not have fully addressed the root cause
- OR there's been a regression in recent changes
- OR this is a different issue with similar symptoms
**Recommendation:** Create a new issue and link it to PROJ-567 as "may be related to" or "regression of"
Should I create a new issue with this context?
自定义必填字段
如果创建问题时因必填字段而失败:
- 检查必填字段。
getJiraIssueTypeMetaWithFields不是主要工具,因此 请通过execute运行:
executeRead( # or execute(...) if your client exposes a single execute tool
name="getJiraIssueTypeMetaWithFields",
cloudId="...",
inputs={"projectIdOrKey": "PROJ", "issueTypeId": "10001"}
)
- 向用户询问字段值:
This project requires additional fields to create a Bug:
- Severity: [High/Medium/Low]
- Affected Version: [Version number]
Please provide these values so I can create the issue.
- 补充字段后重试:
createJiraIssue(
...existing parameters...,
priority="High",
additional_fields={
"customfield_10001": {"value": "Production"}
}
)
高效分类处理的提示
搜索:
建议: ✅ 使用不同角度的多个搜索查询 ✅ 搜索时同时包含未解决和已解决的问题 ✅ 分别搜索错误特征和症状 ✅ 优先查看近期问题(过去 30–90 天) ✅ 查找规律(是否有多个相同问题的报告)
避免: ❌ 使用完整错误消息进行搜索(过于具体) ❌ 只搜索未解决的问题(会遗漏修复历史) ❌ 忽略已解决的问题(会遗漏回归问题) ❌ 使用过多关键词(会减少匹配结果)
创建问题:
建议: ✅ 编写清晰、具体且包含组件名称的摘要 ✅ 在代码块中包含完整的错误消息 ✅ 补充环境和影响信息 ✅ 引用搜索中发现的相关问题 ✅ 对实际 Bug 使用 "Bug" 问题类型
避免: ❌ 创建“生产环境出错”之类含糊的摘要 ❌ 在摘要中粘贴完整堆栈跟踪(请放入描述) ❌ 省略复现步骤 ❌ 忘记说明对用户的影响 ❌ 未检查可用性就硬编码问题类型
用于重复问题评估:
高度确信为重复问题:
- 错误完全相同、组件相同,且最近(< 30 天)
- 已确认根本原因相同
可能是不同问题:
- 错误特征不同
- 组件或系统不同
- 上下文差异显著
不确定时:
- 向用户提供两种选项
- 倾向于创建新问题(之后可将其关闭并标记为重复问题)
- 关联问题比隐藏信息更好
示例
示例 1:找到明确的重复问题
用户输入:
Triage this error: "Connection timeout error when users try to login on iOS app"
处理流程:
- 提取:“Connection timeout”、“login”、“iOS”
- 搜索:找到 PROJ-456(未解决,2 天前创建),错误完全相同
- 分析:匹配度为 95%——错误、组件和症状都相同
- 呈现:将 PROJ-456 显示为重复问题,并建议添加评论
- 执行:用户确认后,添加包含 iOS 特定详细信息的评论
- 确认:已向 PROJ-456 添加评论
输出:
✅ Comment added to PROJ-456
Your iOS-specific error details have been added to the existing issue.
The assignee will be notified.
示例 2:具有相关上下文的新问题
用户输入:
Error: NullPointerException in PaymentProcessor.processRefund() at line 245
Stack trace: [full stack trace]
处理流程:
- 提取:“NullPointerException”、“PaymentProcessor”、“processRefund”、“第 245 行”
- 搜索:找到 PROJ-789(已解决,3 周前),与支付错误有关,但发生在不同的代码行
- 分析:组件相关,但具体错误不同
- 呈现:没有重复问题,但找到了相关问题,建议创建新工单
- 执行:用户确认后,创建包含上下文的新 Bug
- 确认:已创建 PROJ-890
输出:
✅ New Issue Created
PROJ-890 - Payment API: NullPointerException in refund processing
https://yoursite.atlassian.net/browse/PROJ-890
References related issue PROJ-789 for context.
示例 3:可能是回归问题
用户输入:
Users can't upload files larger than 5MB, getting "Upload failed" error
处理流程:
- 提取:“Upload failed”、“5MB”、“file upload”
- 搜索:找到 PROJ-234(2 个月前已解决),问题完全相同
- 分析:问题之前已修复,但现在再次出现
- 呈现:可能是回归问题,建议创建新问题并关联旧问题
- 执行:创建新问题,并将其关联到 PROJ-234,关系标记为“可能由其引起”
- 确认:已创建 PROJ-891,并附上回归问题的上下文
输出:
✅ New Issue Created (Possible Regression)
PROJ-891 - File Upload: Upload failed for files >5MB (Regression?)
https://yoursite.atlassian.net/browse/PROJ-891
This may be a regression of PROJ-234, which was resolved 2 months ago.
Issue includes reference to original fix for investigation.
何时不应使用此技能
此技能仅用于 Bug 和错误分流。请勿用于:
❌ 功能请求(使用 spec-to-backlog) ❌ 创建常规任务(使用 capture-tasks-from-meeting-notes) ❌ 搜索信息(使用 search-company-knowledge) ❌ 生成状态报告(使用 generate-status-report)
请仅在以下情况下使用此技能: ✅ “这是一个重复 Bug 吗?” ✅ “分流此错误消息” ✅ “之前有人报告过这个问题吗?” ✅ “为此创建一个 Bug 工单”
快速参考
主要工作流: 提取 → 搜索 → 分析 → 呈现 → 执行 → 确认
搜索工具: searchJiraIssuesUsingJql(cloudId, jql, fields, maxResults)
操作工具:
addOrEditJiraIssueComment(cloudId, issueIdOrKey, commentBody)- 添加到现有问题createJiraIssue(cloudId, projectKey, issueType, summary, description)- 创建新问题
问题类型: 错误报告始终优先选择“Bug”,使用
executeRead(name="listJiraProjectIssueTypesMetadata", ...) 检查(非主要工具)
请记住:
- 多次搜索可以发现更多重复问题
- 执行操作前先呈现搜索结果
- 包含错误详细信息和上下文
- 引用相关问题
- 如有“Bug”问题类型,请使用
调用非主要工具
Atlassian Rovo MCP 服务仅在工具列表中直接公开少量主要工具。其他工具都在目录中,需通过元工具调用:
discover— 不知道操作名称时,用自然语言描述目标。它会返回要使用的准确name和inputs。如果某个操作已经是主要工具,请勿对其调用discover。- 执行系列工具 — 按名称运行目录中的操作。查看你的工具列表:有些客户端提供单个
execute,其他客户端提供executeRead/executeWrite/executeDestructive,并要求选择与操作匹配的级别。参数完全相同:
executeRead( # or execute(...) if your client exposes a single execute tool
name="<operationName>",
cloudId="...",
inputs={"param": "value"}
)
重要规则:
cloudId是顶层参数,与name和inputs同级——绝不要将其放入inputs。声明了omitCloudId的操作(例如getContentFormatGuide)不需要cloudId。inputs是一个扁平对象。 服务会自行将各参数路由到路径、查询或请求体。- 使用实时工具架构中的准确参数名称。 无法识别的参数会被丢弃,而不会报告错误,因此名称错误会悄无声息地失败——调用成功,但你的值会被忽略。如有疑问,请先查看架构或
discover的结果。 - 如果调用报告操作未知,请使用不同的关键词运行
discover,并使用它返回的名称,不要猜测。