npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jira-ticket-summarizer

v1.0.1-alpha-b9721a.0

Published

JIRA support ticket fetcher and summarizer using Cursor AI

Readme

JIRA Ticket Summarizer

Cursor Commands with Node.js scripts to fetch and summarize JIRA support tickets (both closed and current). The generated AI-powered summaries will provide developers with additional context to help solve new cases and manage the current workload. It could be helpful for managers to better understand the current situation with the support tickets.

Features

  • 🎯 Fetch JIRA tickets using custom JQL queries (closed or current)
  • 💬 Automatically retrieve all comments for each ticket
  • 📝 Generate AI-powered summaries using Cursor
  • 🔧 Configurable project, time range, and mode (closed/current)
  • 📦 Save tickets as JSON and summaries as Markdown
  • 📊 Two summary modes:
    • Closed tickets: Pattern analysis (root causes, solutions)
    • Current tickets: Workload analysis (assignees, priorities, status)

Prerequisites

  • Node.js 22+ with npm
  • JIRA Cloud account with API access
  • Cursor IDE

Setup

1. Install Dependencies

npm install

2. Configure JIRA Credentials

Copy the example environment file and fill in your credentials:

cp .env.example .env

Edit .env with your JIRA details:

JIRA_URL=https://your-domain.atlassian.net
[email protected]
JIRA_API_TOKEN=your-api-token
JIRA_DEFAULT_PROJECT=ABC
JIRA_DEFAULT_DAYS_BACK=7

To generate a JIRA API token:

  1. Go to https://id.atlassian.com/manage/api-tokens
  2. Click "Create API token"
  3. Give it a name and copy the token
  4. Paste it into your .env file

3. Build the Project

npm run build

Usage

Summarize Closed Tickets

Type in Cursor chat:

/summarize-closed-tickets

This will:

  • Fetch closed tickets from ${JIRA_DEFAULT_PROJECT} project (last ${JIRA_DEFAULT_DAYS_BACK} days)
  • Analyze all tickets together to identify patterns
  • Generate a SINGLE comprehensive summary (tickets/SUMMARY.md) with:
    • Similar cases grouped by root cause
    • Similar cases grouped by solution
    • Resolution time statistics
    • Additional helpful information

You can also specify the project and days back value:

/summarize-closed-tickets Project RES, days back 14

Summarize Current Tickets

Type in Cursor chat:

/summarize-current-tickets

This will:

  • Fetch current tickets (In Progress or New) from ${JIRA_DEFAULT_PROJECT} project
  • Analyze workload distribution and priorities
  • Generate a SINGLE comprehensive summary (tickets/SUMMARY.md) with:
    • Workload grouped by assignee
    • Tickets grouped by priority
    • Status breakdown (New vs In Progress)
    • Oldest tickets needing attention
    • Actionable recommendations

You can also specify the project:

/summarize-current-tickets Project RES

Output

Tickets Directory

Fetched tickets are saved to tickets/ directory:

  • tickets/{TICKET-KEY}.json - Raw ticket data with comments

Summaries

AI-generated summary is saved to:

  • tickets/SUMMARY.md - Comprehensive analysis of all tickets (format depends on mode)

JQL Queries

Closed Tickets Mode (default)

project = ${JIRA_DEFAULT_PROJECT} 
AND type IN ("Support Ticket", "Support Task") 
AND statuscategory = Complete 
AND resolved >= -${JIRA_DEFAULT_DAYS_BACK}d 
ORDER BY resolved DESC

Current Tickets Mode

project = ${JIRA_DEFAULT_PROJECT} 
AND type IN ("Support Ticket", "Support Task") 
AND statuscategory IN ("In Progress", New) 
ORDER BY assignee DESC, statusCategory DESC, priority DESC, created DESC

Project Structure

support-tickets-summary/
├── .cursor/                        # Cursor IDE configuration
│   └── commands/
│       ├── summarize-closed-tickets.md   # Command for closed tickets
│       └── summarize-current-tickets.md  # Command for current tickets
├── .env                            # Your JIRA credentials (not in git)
├── .env.example                    # Template for credentials
├── .nvmrc                          # Node version specification
├── package.json                    # Project dependencies
├── tsconfig.json                   # TypeScript configuration
├── README.md                       # This file
├── src/
│   ├── fetch-tickets.ts            # Main script (supports both modes)
│   ├── types.ts                    # TypeScript interfaces
│   └── utils/
│       ├── jira-client.ts          # JIRA API wrapper
│       └── file-utils.ts           # File operations
├── dist/                           # Compiled JavaScript (generated)
│   ├── fetch-tickets.js
│   ├── types.js
│   └── utils/
└── tickets/                        # Output directory
    ├── *.json                      # Fetched tickets
    └── SUMMARY.md                  # AI-generated comprehensive analysis

Ticket Data Structure

Each ticket JSON file contains:

{
  key: string;              // e.g., "RES-1234"
  summary: string;          // Ticket title
  status: string;           // e.g., "Done"
  issueType: string;        // e.g., "Support Ticket"
  created: string;          // ISO date
  updated: string;          // ISO date
  description?: string;     // Ticket description
  statusCategory?: string;  // e.g., "Complete"
  priority?: string;        // e.g., "High"
  resolved?: string;        // ISO date
  reporter?: string;        // Reporter name
  assignee?: string;        // Assignee name
  comments: [               // Array of comments
    {
      author: string;
      body: string;
      created: string;
    }
  ]
}

Summary Formats

The AI-generated summary format depends on the mode:

Closed Tickets Summary

  1. Executive Summary - Overview of all tickets and key trends
  2. Analysis by Root Cause - Groups similar tickets by underlying issue
  3. Analysis by Solution - Groups tickets by resolution approach
  4. Individual Ticket Details - Quick reference for each ticket
  5. Resolution Time Statistics - Performance metrics

Current Tickets Summary

  1. Executive Summary - Workload overview and urgent items
  2. Immediate Actions Required - Specific actions needed for individual tickets (move to different team, reassign, unblock, clarify, etc.)
  3. Workload by Assignee - Distribution of tickets per team member
  4. High Priority Tickets - Urgent items requiring attention
  5. New vs In Progress - Status breakdown
  6. Oldest Tickets - Items that have been open longest
  7. All Tickets by Status and Priority - Complete ticket listing

Troubleshooting

Authentication Errors

If you see authentication errors:

  • Verify your JIRA_URL is correct (should include https://)
  • Check that your JIRA_EMAIL matches your account
  • Regenerate your JIRA_API_TOKEN if needed

No Tickets Found

If no tickets are returned:

  • Verify the project key exists (e.g., "RES")
  • Check that tickets match the JQL criteria
  • Ensure you have permission to view the project

Development

Modifying the JQL Queries

Edit src/fetch-tickets.ts and modify the buildJqlQuery function to customize the query logic for either mode (closed or current).

CLI Arguments

The fetch script supports the following arguments:

  • --project <PROJECT_KEY> - JIRA project key (default: from .env)
  • --days <NUMBER> - Number of days back for closed tickets (default: from .env)

Example:

npm run fetch:closed --project RES --days 14
npm run fetch:current --project RES

License

ISC

Contributing

Feel free to submit issues and enhancement requests!