jira-fetcher
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJira Ticket Fetcher
Jira工单获取工具
Fetch Jira ticket details and trigger PRD planning workflow.
获取Jira工单详情并触发PRD规划工作流。
Prerequisites
前置条件
Set these environment variables:
- : Personal access token for Jira Cloud authentication
JIRA_API_TOKEN - : Your Atlassian account email address
JIRA_EMAIL - : Jira site URL (default:
JIRA_SITE_URL)https://sozialinfo.atlassian.net
设置以下环境变量:
- : Jira Cloud认证用的个人访问令牌
JIRA_API_TOKEN - : 你的Atlassian账户邮箱地址
JIRA_EMAIL - : Jira站点URL(默认值:
JIRA_SITE_URL)https://sozialinfo.atlassian.net
Workflow
工作流
- Fetch ticket: Run fetch script with the ticket key
- Display ticket info: Show link, ticket ID, title, and description
- Trigger PRD skill: Immediately start PRD planning with ticket context
- 获取工单:使用工单密钥运行获取脚本
- 展示工单信息:显示链接、工单ID、标题和描述
- 触发PRD技能:基于工单上下文立即启动PRD规划
Step 1: Fetch Ticket
步骤1:获取工单
Execute fetch script:
bash
python3 scripts/fetch_jira_ticket.py <ticket-key>The script returns JSON with:
- : Ticket ID (e.g., "PROJ-123")
key - : Direct URL to the ticket
link - : Ticket summary/title
title - : Ticket description (may be in Atlassian Document Format)
description
Handle errors by returning the full API error message to the user.
执行获取脚本:
bash
python3 scripts/fetch_jira_ticket.py <ticket-key>脚本会返回包含以下内容的JSON:
- : 工单ID(例如:"PROJ-123")
key - : 工单的直接URL
link - : 工单摘要/标题
title - : 工单描述(可能采用Atlassian Document Format格式)
description
错误处理:将完整的API错误信息返回给用户。
Step 2: Display Ticket Info
步骤2:展示工单信息
Present the fetched information to the user in a clear format:
markdown
undefined以清晰的格式向用户展示获取到的信息:
markdown
undefinedJira Ticket: {key}
Jira Ticket: {key}
Link: {link}
Title: {title}
Description:
{description}
undefinedLink: {link}
Title: {title}
Description:
{description}
undefinedStep 3: Trigger PRD Skill
步骤3:触发PRD技能
After displaying the ticket, immediately start the PRD planning workflow:
- Inform the user: Briefly state that you're now creating a PRD based on the ticket
- Provide context: The PRD skill has access to the ticket details from Step 2
- Ask clarifying questions: Use the PRD skill's question format with ticket context in mind
Example PRD question:
Based on this ticket, what is the primary goal?
A. [Option based on ticket]
B. [Option based on ticket]
C. [Option based on ticket]
D. Other: [please specify]The PRD skill will then generate a comprehensive PRD document with:
- User stories and acceptance criteria
- Functional requirements
- Success metrics
- Non-goals (out of scope)
展示工单后,立即启动PRD规划工作流:
- 告知用户:简要说明当前正在基于该工单创建PRD
- 提供上下文:PRD技能可访问步骤2中的工单详情
- 提出澄清问题:结合工单上下文,使用PRD技能的问题格式提问
PRD问题示例:
Based on this ticket, what is the primary goal?
A. [Option based on ticket]
B. [Option based on ticket]
C. [Option based on ticket]
D. Other: [please specify]随后PRD技能将生成包含以下内容的完整PRD文档:
- 用户故事与验收标准
- 功能需求
- 成功指标
- 非目标(超出范围内容)
Important Notes
重要说明
- No automatic PRD creation: Do NOT create the PRD automatically. Let the PRD skill handle its workflow (questions → generation)
- Context availability: The PRD skill has full ticket context available when asking clarifying questions
- Error handling: If the API call fails, return the exact error message from the API response
- Description format: Jira descriptions may be in Atlassian Document Format (JSON); present this to the user as-is
- 禁止自动创建PRD:不要自动创建PRD,让PRD技能处理其工作流(提问→生成)
- 上下文可用性:PRD技能在提出澄清问题时可访问完整的工单上下文
- 错误处理:如果API调用失败,返回API响应中的完整错误信息
- 描述格式:Jira工单描述可能采用Atlassian Document Format(JSON)格式;直接原样展示给用户
Example Session
示例会话
User: "Fetch JIRA-123"
Agent:
- Runs
python3 scripts/fetch_jira_ticket.py JIRA-123 - Displays ticket info (link, title, description)
- Says: "Now creating a PRD based on this ticket. I have the ticket context and will ask clarifying questions."
- Activates PRD skill and asks: "Based on this ticket about user authentication, what's the primary goal? A. Improve security, B. Simplify login, C. Add OAuth, D. Other"
用户:"获取JIRA-123"
Agent:
- 运行
python3 scripts/fetch_jira_ticket.py JIRA-123 - 展示工单信息(链接、标题、描述)
- 回复:"现在基于该工单创建PRD。我已获取工单上下文,接下来会提出澄清问题。"
- 激活PRD技能并提问:"基于这篇关于用户认证的工单,主要目标是什么?A. 提升安全性,B. 简化登录流程,C. 添加OAuth功能,D. 其他"