Workflow: Fetch Jira Requirements
BẮT BUỘC (MANDATORY SKILL): Bạn PHẢI nạp và đọc kỹ nội dung của skill
$jira-integration(tại.agents/skills/jira-integration/SKILL.md) để biết cách sử dụng scripts trước khi bắt đầu.
Workflow này giúp lấy requirements, user stories, hoặc issues từ Jira và chuyển thành tài liệu phục vụ test automation.
Các bước thực hiện:
-
Kiểm tra prerequisites:
- Đọc skill
$jira-integrationđể nắm cấu trúc scripts. - Kiểm tra file
.envđã tồn tại và được cấu hình đúng. - Kiểm tra dependencies đã được cài đặt (
scripts/integrations/node_modules/). - Nếu chưa cài, chạy:
cd scripts/integrations && npm install
- Đọc skill
-
Xác định thông tin cần lấy:
- Hỏi user cung cấp thông tin:
- Issue key cụ thể (VD:
PROJ-123) → dùng--issue - Project key + Issue type (VD:
PROJ,Story) → dùng--project --type - JQL query tùy chỉnh → dùng
--jql - Epic key (lấy children) → dùng
--epic
- Issue key cụ thể (VD:
- Xác định format output:
json(default) hoặcmd(markdown requirement)
- Hỏi user cung cấp thông tin:
-
Thực thi script:
- Chạy lệnh phù hợp:
bash# Lấy 1 issue cụ thể node scripts/integrations/jira/jira_fetcher.js --issue <ISSUE_KEY> # Lấy issues theo project node scripts/integrations/jira/jira_fetcher.js --project <PROJECT_KEY> --type <TYPE> --max <N> # Tìm theo JQL node scripts/integrations/jira/jira_fetcher.js --jql "<JQL_QUERY>" # Xuất Markdown node scripts/integrations/jira/jira_fetcher.js --issue <KEY> --format md --output ./requirements/jira -
Xử lý kết quả:
- Kiểm tra output file được tạo trong
requirements/jira/(hoặc--outputchỉ định). - Nếu format
json: Đọc và hiển thị tóm tắt issues cho user. - Nếu format
md: Hiển thị nội dung markdown requirement cho user review. - Nếu gặp lỗi: Đọc log, phân tích nguyên nhân theo bảng Troubleshooting trong skill.
- Kiểm tra output file được tạo trong
-
Xử lý lỗi thường gặp:
- HTTP 401: Token sai → hướng dẫn user kiểm tra
JIRA_API_TOKENhoặcJIRA_PAT - HTTP 404: Issue không tồn tại hoặc
JIRA_BASE_URLsai - File .env not found: Hướng dẫn user copy
.env.example→.env - Module not found: Chạy
npm installtrongscripts/integrations/
- HTTP 401: Token sai → hướng dẫn user kiểm tra
-
Delivery:
- Trình bày kết quả bằng Tiếng Việt.
- Nếu user yêu cầu chuyển thành requirement document, sử dụng skill
$requirements-analyzerđể format lại. - Lưu file output vào thư mục phù hợp (
requirements/jira/).


