jpskill.com
💼 ビジネス コミュニティ

jira-search

Jiraの課題をJQLクエリで検索し、プロジェクトや担当者、ステータス、日付などで絞り込んでレポート作成に活用するSkill。

📜 元の英語説明(参考)

Search Jira issues using JQL queries. Use when filtering issues by project, status, assignee, date, or building reports.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Jiraの課題をJQLクエリで検索し、プロジェクトや担当者、ステータス、日付などで絞り込んでレポート作成に活用するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Jira 検索スキル

目的

JQL (Jira Query Language) を使用して課題を検索します。フィルタリング、ページネーション、フィールド選択をサポートしています。

使用場面

  • プロジェクト、ステータス、担当者、日付で課題を検索する場合
  • 課題リストやレポートを作成する場合
  • 特定の条件で特定の課題を見つける場合
  • フィルタリングされた課題に対して一括操作を行う場合

前提条件

  • 認証済みの JiraClient (jira-auth スキルを参照してください)
  • プロジェクトへのアクセス権限

実装パターン

ステップ 1: 検索タイプを定義する

interface SearchOptions {
  jql: string;
  startAt?: number;
  maxResults?: number;
  fields?: string[];
  expand?: string[];
}

interface SearchResponse {
  startAt: number;
  maxResults: number;
  total: number;
  issues: JiraIssue[];
}

ステップ 2: 基本的な検索

async function searchIssues(
  client: JiraClient,
  options: SearchOptions
): Promise<SearchResponse> {
  return client.request<SearchResponse>('/search', {
    method: 'POST',
    body: JSON.stringify({
      jql: options.jql,
      startAt: options.startAt ?? 0,
      maxResults: options.maxResults ?? 50,
      fields: options.fields ?? ['key', 'summary', 'status', 'assignee', 'created'],
      expand: options.expand,
    }),
  });
}

ステップ 3: 全件検索 (ページネーション付き)

async function searchAllIssues(
  client: JiraClient,
  jql: string,
  fields: string[] = ['key', 'summary', 'status']
): Promise<JiraIssue[]> {
  const allIssues: JiraIssue[] = [];
  let startAt = 0;
  const maxResults = 100;

  while (true) {
    const response = await searchIssues(client, {
      jql,
      startAt,
      maxResults,
      fields,
    });

    allIssues.push(...response.issues);

    if (startAt + response.issues.length >= response.total) {
      break;
    }

    startAt += maxResults;
  }

  return allIssues;
}

ステップ 4: 一般的な検索ビルダー

// プロジェクトで検索
function searchByProject(projectKey: string): string {
  return `project = ${projectKey}`;
}

// ステータスで検索
function searchByStatus(status: string | string[]): string {
  if (Array.isArray(status)) {
    return `status IN (${status.map(s => `'${s}'`).join(', ')})`;
  }
  return `status = '${status}'`;
}

// 担当者で検索
function searchByAssignee(accountId: string): string {
  return `assignee = '${accountId}'`;
}

// 自分の課題を検索
function searchMyIssues(): string {
  return `assignee = currentUser()`;
}

// 日付範囲で検索
function searchByCreatedDate(daysAgo: number): string {
  return `created >= -${daysAgo}d`;
}

// 条件を結合
function combineJql(...conditions: string[]): string {
  return conditions.join(' AND ');
}

ステップ 5: 高度な検索例

// プロジェクト内のすべてのオープンな課題を見つける
async function findOpenIssues(client: JiraClient, projectKey: string) {
  return searchAllIssues(
    client,
    combineJql(
      searchByProject(projectKey),
      `status NOT IN (Done, Closed)`
    )
  );
}

// 自分の最近の課題を見つける
async function findMyRecentIssues(client: JiraClient, daysAgo: number = 7) {
  return searchAllIssues(
    client,
    combineJql(
      searchMyIssues(),
      searchByCreatedDate(daysAgo)
    )
  );
}

// ラベルで課題を見つける
async function findByLabel(client: JiraClient, projectKey: string, label: string) {
  return searchAllIssues(
    client,
    combineJql(
      searchByProject(projectKey),
      `labels = '${label}'`
    )
  );
}

// 未割り当ての課題を見つける
async function findUnassigned(client: JiraClient, projectKey: string) {
  return searchAllIssues(
    client,
    combineJql(
      searchByProject(projectKey),
      `assignee IS EMPTY`
    )
  );
}

JQL クイックリファレンス

演算子

演算子 説明
= status = Done 等しい
!= status != Done 等しくない
IN status IN (Done, Closed) いずれか
NOT IN status NOT IN (Done) いずれでもない
~ summary ~ "bug" 含む
IS EMPTY assignee IS EMPTY null である
IS NOT EMPTY assignee IS NOT EMPTY null でない
>= created >= -7d 以上
<= created <= 2025-01-01 以下

日付形式

形式 説明
相対 -7d 7 日前
相対 -2w 2 週間前
相対 -1m 1 ヶ月前
絶対 2025-01-15 特定の日付
関数 startOfDay() 今日の深夜
関数 startOfWeek() 月曜日

一般的な JQL パターン

# プロジェクト内のすべての課題
project = SCRUM

# オープンな課題
project = SCRUM AND status != Done

# 自分の課題
assignee = currentUser()

# 優先度が高いオープンな課題
project = SCRUM AND priority = High AND status != Done

# 今週作成された課題
project = SCRUM AND created >= startOfWeek()

# 最近更新された課題
project = SCRUM AND updated >= -7d

# 未割り当てのバグ
project = SCRUM AND issuetype = Bug AND assignee IS EMPTY

# 特定のラベルを持つ課題
project = SCRUM AND labels = "urgent"

# 概要のテキスト検索
project = SCRUM AND summary ~ "authentication"

curl の例

基本的な検索

curl -X POST "$JIRA_BASE_URL/rest/api/3/search" \
  -H "Authorization: Basic $(echo -n 'email:token' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "jql": "project = SCRUM AND status != Done",
    "startAt": 0,
    "maxResults": 50,
    "fields": ["key", "summary", "status", "assignee"]
  }'

ページネーション付き検索

curl -X POST "$JIRA_BASE_URL/rest/api/3/search" \
  -H "Authorization: Basic $(echo -n 'email:token' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "jql": "project = SCRUM",
    "startAt": 50,
    "maxResults": 50,
    "fields": ["key", "summary"]
  }'
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Jira Search Skill

Purpose

Search for issues using JQL (Jira Query Language). Supports filtering, pagination, and field selection.

When to Use

  • Searching issues by project, status, assignee, date
  • Building issue lists and reports
  • Finding specific issues by criteria
  • Bulk operations on filtered issues

Prerequisites

  • Authenticated JiraClient (see jira-auth skill)
  • Project access permissions

Implementation Pattern

Step 1: Define Search Types

interface SearchOptions {
  jql: string;
  startAt?: number;
  maxResults?: number;
  fields?: string[];
  expand?: string[];
}

interface SearchResponse {
  startAt: number;
  maxResults: number;
  total: number;
  issues: JiraIssue[];
}

Step 2: Basic Search

async function searchIssues(
  client: JiraClient,
  options: SearchOptions
): Promise<SearchResponse> {
  return client.request<SearchResponse>('/search', {
    method: 'POST',
    body: JSON.stringify({
      jql: options.jql,
      startAt: options.startAt ?? 0,
      maxResults: options.maxResults ?? 50,
      fields: options.fields ?? ['key', 'summary', 'status', 'assignee', 'created'],
      expand: options.expand,
    }),
  });
}

Step 3: Search All (Paginated)

async function searchAllIssues(
  client: JiraClient,
  jql: string,
  fields: string[] = ['key', 'summary', 'status']
): Promise<JiraIssue[]> {
  const allIssues: JiraIssue[] = [];
  let startAt = 0;
  const maxResults = 100;

  while (true) {
    const response = await searchIssues(client, {
      jql,
      startAt,
      maxResults,
      fields,
    });

    allIssues.push(...response.issues);

    if (startAt + response.issues.length >= response.total) {
      break;
    }

    startAt += maxResults;
  }

  return allIssues;
}

Step 4: Common Search Builders

// Search by project
function searchByProject(projectKey: string): string {
  return `project = ${projectKey}`;
}

// Search by status
function searchByStatus(status: string | string[]): string {
  if (Array.isArray(status)) {
    return `status IN (${status.map(s => `'${s}'`).join(', ')})`;
  }
  return `status = '${status}'`;
}

// Search by assignee
function searchByAssignee(accountId: string): string {
  return `assignee = '${accountId}'`;
}

// Search my issues
function searchMyIssues(): string {
  return `assignee = currentUser()`;
}

// Search by date range
function searchByCreatedDate(daysAgo: number): string {
  return `created >= -${daysAgo}d`;
}

// Combine conditions
function combineJql(...conditions: string[]): string {
  return conditions.join(' AND ');
}

Step 5: Advanced Search Examples

// Find all open issues in project
async function findOpenIssues(client: JiraClient, projectKey: string) {
  return searchAllIssues(
    client,
    combineJql(
      searchByProject(projectKey),
      `status NOT IN (Done, Closed)`
    )
  );
}

// Find my recent issues
async function findMyRecentIssues(client: JiraClient, daysAgo: number = 7) {
  return searchAllIssues(
    client,
    combineJql(
      searchMyIssues(),
      searchByCreatedDate(daysAgo)
    )
  );
}

// Find issues by label
async function findByLabel(client: JiraClient, projectKey: string, label: string) {
  return searchAllIssues(
    client,
    combineJql(
      searchByProject(projectKey),
      `labels = '${label}'`
    )
  );
}

// Find unassigned issues
async function findUnassigned(client: JiraClient, projectKey: string) {
  return searchAllIssues(
    client,
    combineJql(
      searchByProject(projectKey),
      `assignee IS EMPTY`
    )
  );
}

JQL Quick Reference

Operators

Operator Example Description
= status = Done Equals
!= status != Done Not equals
IN status IN (Done, Closed) One of
NOT IN status NOT IN (Done) Not one of
~ summary ~ "bug" Contains
IS EMPTY assignee IS EMPTY Is null
IS NOT EMPTY assignee IS NOT EMPTY Is not null
>= created >= -7d Greater/equal
<= created <= 2025-01-01 Less/equal

Date Formats

Format Example Description
Relative -7d 7 days ago
Relative -2w 2 weeks ago
Relative -1m 1 month ago
Absolute 2025-01-15 Specific date
Function startOfDay() Today midnight
Function startOfWeek() Monday

Common JQL Patterns

# All issues in project
project = SCRUM

# Open issues
project = SCRUM AND status != Done

# My issues
assignee = currentUser()

# High priority open issues
project = SCRUM AND priority = High AND status != Done

# Created this week
project = SCRUM AND created >= startOfWeek()

# Updated recently
project = SCRUM AND updated >= -7d

# Unassigned bugs
project = SCRUM AND issuetype = Bug AND assignee IS EMPTY

# Issues with specific label
project = SCRUM AND labels = "urgent"

# Text search in summary
project = SCRUM AND summary ~ "authentication"

curl Examples

Basic Search

curl -X POST "$JIRA_BASE_URL/rest/api/3/search" \
  -H "Authorization: Basic $(echo -n 'email:token' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "jql": "project = SCRUM AND status != Done",
    "startAt": 0,
    "maxResults": 50,
    "fields": ["key", "summary", "status", "assignee"]
  }'

Search with Pagination

curl -X POST "$JIRA_BASE_URL/rest/api/3/search" \
  -H "Authorization: Basic $(echo -n 'email:token' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "jql": "project = SCRUM",
    "startAt": 50,
    "maxResults": 50,
    "fields": ["key", "summary"]
  }'

Search with Changelog Expand

curl -X POST "$JIRA_BASE_URL/rest/api/3/search" \
  -H "Authorization: Basic $(echo -n 'email:token' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "jql": "project = SCRUM AND updated >= -7d",
    "maxResults": 50,
    "fields": ["key", "summary", "status"],
    "expand": ["changelog"]
  }'

Response Structure

{
  "startAt": 0,
  "maxResults": 50,
  "total": 150,
  "issues": [
    {
      "id": "10001",
      "key": "SCRUM-1",
      "self": "$JIRA_BASE_URL/rest/api/3/issue/10001",
      "fields": {
        "summary": "Issue summary",
        "status": { "name": "To Do" },
        "assignee": { "displayName": "John Doe" }
      }
    }
  ]
}

Pagination Formula

Total pages = ceil(total / maxResults)
Current page = floor(startAt / maxResults) + 1
Has more = (startAt + issues.length) < total
Next startAt = startAt + maxResults

Common Mistakes

  • Not quoting status values with spaces
  • Using email instead of accountId for assignee
  • Forgetting pagination for large result sets
  • Not escaping special characters in search text

References

Version History

  • 2025-12-10: Created