---
name: fetch-jira-ticket
description: Use when user asks about a Jira ticket, mentions a ticket number like ABC-123 or TEAM-45, wants ticket details, description, attachments, comments, or checklists from Jira
---

# Fetch Jira Ticket

Retrieve Jira ticket information and manage checklists using workspace scripts.

## Script Locations

```
~/scripts/get-jira-ticket.sh
~/scripts/jira-checklist.sh
```

## Get Ticket Details

```bash
# Basic - summary, description, attachments
get-jira-ticket.sh <TICKET-KEY>

# Include comments
get-jira-ticket.sh <TICKET-KEY> --comments

# Download attachments to /tmp/jira-<ticket>/
get-jira-ticket.sh <TICKET-KEY> --download

# All options
get-jira-ticket.sh <TICKET-KEY> --comments --download
```

### What It Returns

- Header: ticket key, summary, type, status, priority, assignee, reporter, dates
- Description: full description (handles Atlassian Document Format)
- Attachments: list with URLs, file sizes, type indicators
- Comments: (with `--comments`) all ticket comments

### Viewing Downloaded Images

After `--download`, images saved to `/tmp/jira-<ticket>/`. Use Read tool to view.

## Manage Checklists

```bash
# List checklist items
jira-checklist.sh <TICKET-KEY> list

# Mark item as done (by item number)
jira-checklist.sh <TICKET-KEY> check 2

# Mark item as open
jira-checklist.sh <TICKET-KEY> uncheck 3

# Add new item
jira-checklist.sh <TICKET-KEY> add "Review PR"

# Add new checklist header
jira-checklist.sh <TICKET-KEY> add-header "Phase 2"
```

## Quick Reference

| Task             | Command                                 |
|------------------|-----------------------------------------|
| Quick overview   | `get-jira-ticket.sh ABC-123`            |
| Full context     | `get-jira-ticket.sh ABC-123 --comments` |
| View screenshots | `get-jira-ticket.sh ABC-123 --download` |
| List checklist   | `jira-checklist.sh ABC-123 list`        |
| Check item       | `jira-checklist.sh ABC-123 check 1`     |
| Add item         | `jira-checklist.sh ABC-123 add "Task"`  |
