jira-ticket-viewer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Jira Ticket Viewer

Jira工单查看器

Fetch and display Jira ticket details using the
jira
CLI tool.
使用
jira
CLI工具获取并展示Jira工单详情。

Arguments

参数

  • $ARGUMENTS[0]
    — Jira issue key (e.g.
    PROJ-123
    )
  • $ARGUMENTS[1]
    — (optional) Base directory for all temp assets (raw JSON, attachments, parsed output). Defaults to
    .implement-assets/jira
When invoked by the orchestrator (e.g.
implement
),
$ARGUMENTS[1]
is provided. When used standalone, it defaults to
.implement-assets/jira
.
  • $ARGUMENTS[0]
    — Jira问题密钥(例如
    PROJ-123
  • $ARGUMENTS[1]
    —(可选)所有临时资源的基础目录(原始JSON、附件、解析后的输出)。默认值为
    .implement-assets/jira
当由编排器(如
implement
)调用时,会提供
$ARGUMENTS[1]
。当独立使用时,默认值为
.implement-assets/jira

System Requirements

系统要求

Execution

执行步骤

  1. Pre-flight check: Run
    jira me
    to verify the CLI is installed and authenticated — if it fails, follow error handling in references/rules.md. Do NOT continue until
    jira me
    succeeds.
  2. Validate
    $ARGUMENTS[0]
    against references/rules.md
  3. Fetch raw JSON (single API call): Run
    mkdir -p $ARGUMENTS[1] && jira issue view $ARGUMENTS[0] --raw > $ARGUMENTS[1]/raw.json
    via Bash
  4. Parse ticket: Run
    node ./scripts/parse-ticket.js < $ARGUMENTS[1]/raw.json > $ARGUMENTS[1]/output.json
    via Bash to get the parsed JSON output
  5. Interpret comments: If the parsed JSON contains a non-empty
    comments
    array, analyze them following references/comment-rules.md. Replace the
    comments
    array in the JSON with a
    commentSummary
    object, then save the updated JSON back to
    $ARGUMENTS[1]/output.json
    using the Write tool.
  6. Attachments: If the parsed JSON contains a non-empty
    attachments
    array, download them:
    • Run
      node ./scripts/download-attachment.js --out $ARGUMENTS[1] < $ARGUMENTS[1]/raw.json
      via Bash
    • If
      JIRA_API_TOKEN
      is not set, follow error handling in references/rules.md
    • Include downloaded attachment file paths in the output
  7. Return the parsed JSON output (see references/output-format.md for schema reference), including attachment download paths if any
<tags> <mode>think</mode> <custom>yes</custom> </tags>
  1. 预检检查:运行
    jira me
    以验证CLI已安装通过身份验证——如果失败,请遵循references/rules.md中的错误处理流程。在
    jira me
    执行成功前,请勿继续。
  2. 根据references/rules.md验证
    $ARGUMENTS[0]
  3. 获取原始JSON(单次API调用):通过Bash运行
    mkdir -p $ARGUMENTS[1] && jira issue view $ARGUMENTS[0] --raw > $ARGUMENTS[1]/raw.json
  4. 解析工单:通过Bash运行
    node ./scripts/parse-ticket.js < $ARGUMENTS[1]/raw.json > $ARGUMENTS[1]/output.json
    以获取解析后的JSON输出
  5. 解读评论:如果解析后的JSON包含非空的
    comments
    数组,请按照references/comment-rules.md进行分析。将JSON中的
    comments
    数组替换为
    commentSummary
    对象,然后使用写入工具将更新后的JSON保存回
    $ARGUMENTS[1]/output.json
  6. 附件:如果解析后的JSON包含非空的
    attachments
    数组,请下载它们:
    • 通过Bash运行
      node ./scripts/download-attachment.js --out $ARGUMENTS[1] < $ARGUMENTS[1]/raw.json
    • 如果未设置
      JIRA_API_TOKEN
      ,请遵循references/rules.md中的错误处理流程
    • 在输出中包含已下载附件的文件路径
  7. 返回解析后的JSON输出(参考references/output-format.md中的架构说明),如果有附件则包含附件下载路径
<tags> <mode>think</mode> <custom>yes</custom> </tags>