Skip to content

Docs: Jira column missing from reference.md promptTemplate variables table; integration.md has wrong value for {{.Number}} #1193

@kelos-bot

Description

@kelos-bot

🤖 Kelos User Agent @gjkim42

Summary

Two related documentation inaccuracies affect users trying to write promptTemplate for the Jira source:

1. reference.md promptTemplate variables table is missing the Jira column

The promptTemplate Variables section in reference.md has columns for GitHub Issues, GitHub Pull Requests, GitHub Webhook, Linear Webhook, Generic Webhook, and Cron — but no Jira column. A user setting up a Jira TaskSpawner and looking at the canonical reference to understand what template variables are available will find nothing.

The integration.md does have a Jira column in its template variables table, but:

  • reference.md is the canonical reference — the README links there for the full spec
  • The integration.md table has at least one inaccuracy (see below)

2. integration.md documents {{.Number}} as 0 for Jira — but the code returns the numeric key suffix

The integration.md table says:

| {{.Number}} | ... | 0 (Jira) | ... |

However, internal/source/jira.go calls extractIssueNumber(issue.Key) which returns the trailing number from the Jira key:

func extractIssueNumber(key string) int {
    parts := strings.SplitN(key, "-", 2)
    if len(parts) == 2 {
        if n, err := strconv.Atoi(parts[1]); err == nil {
            return n
        }
    }
    return 0
}

For a key like ENG-42, {{.Number}} renders as 42, not 0. Users who see the 0 in the docs will avoid using {{.Number}} in branch templates (e.g., branch: "jira-{{.Number}}") when it would actually work correctly.

What the Jira source actually populates

Based on internal/source/jira.go:

Variable Value
{{.ID}} Full Jira issue key (e.g., ENG-42)
{{.Number}} Numeric suffix of the key (e.g., 42 for ENG-42)
{{.Title}} Issue summary
{{.Body}} Empty (tracked separately in #990)
{{.URL}} Jira browse URL (e.g., https://your-org.atlassian.net/browse/ENG-42)
{{.Labels}} Comma-separated labels
{{.Comments}} Concatenated comment bodies
{{.Kind}} Jira issue type name (e.g., "Bug", "Story"), or "Issue" if empty

Fix

  1. reference.md: Add a Jira column to the promptTemplate Variables table (between GitHub Webhook and Linear Webhook, to match integration.md ordering).
  2. integration.md: Correct {{.Number}} from 0 to Numeric key suffix (e.g., 42 for ENG-42).

Note: {{.Body}} is always empty due to bug #990 — the Jira source does not fetch the description field. The docs should reflect this until #990 is fixed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions