Create GitHub Issues and Jira Bugs
You want to turn a failed test into a GitHub issue or Jira bug without rewriting the failure by hand. JJI generates a draft from the analysis, surfaces likely duplicates, and lets you file the ticket in the tracker that owns the problem.
Prerequisites
- A completed analysis report with the failure you want to file.
- GitHub or Jira ticket creation must be available on your server. Run
jji capabilitiesif you want to check before you start. See Configuration and Environment Reference for server-side setup details. - In the browser, save a personal tracker token in
Settings. You can preview a draft without one, but the dialog will not enableCreateuntil the matching token is saved. - For GitHub, have a personal access token with
reposcope and a repo target. - For Jira Cloud, have a Jira token, your Jira email, and a project key. For Jira Server/Data Center, use a Jira token and project key.
Quick Example
jji preview-issue job-1 \
--test tests.TestA.test_one \
--type github \
--github-token "<your-github-token>" \
--github-repo-url "https://github.com/org/repo"
jji create-issue job-1 \
--test tests.TestA.test_one \
--type github \
--title "Bug fix" \
--body "Details..." \
--github-token "<your-github-token>" \
--github-repo-url "https://github.com/org/repo"
The preview command prints the generated title, body, and any Similar issues. The create command returns the new issue URL and the comment id JJI added back on the failure.
Tip: Add
--jsonto either command if you want machine-readable output.
The report page uses the same preview-edit-create flow directly from each failure card.
Step-by-Step
- Open the completed report and expand the failure you want to file.
- Click
GitHub IssueorJira Bugon that failure. - Review the generated draft.
- JJI opens a preview dialog with an editable title and body.
-
Use this step to tighten the summary, remove noise, or add extra context before you submit.
-
Check likely duplicates.
- Review the
Similar issuessection before you create a new ticket. - Each result links to the existing issue and shows its current status when the tracker returns one.
-
An empty list does not block creation.
-
Choose the destination.
- GitHub: if the analysis used more than one repo, choose the correct repo from the dropdown. If the analysis used only one repo, JJI uses it automatically.
-
Jira: enter or pick the project key that should receive the bug. If your Jira account exposes issue security levels, choose the level you want before you create.
-
Create the ticket.
- Click
Create GitHub IssueorCreate Jira Bug. - JJI opens the new ticket and adds a comment on the failure linking back to it.
Note: In the browser, preview works without a personal GitHub or Jira token, but the
Createbutton stays disabled until the matching token is saved inSettings.Tip: Treat duplicate matching as a fast sanity check, not a hard blocker. Review the shortlist, then use your judgment.
Advanced Usage
Check server support first
jji capabilities --json
Use this when you want to confirm whether GitHub or Jira creation is enabled before you script anything. The JSON output also shows whether the server already has tracker credentials configured.
Validate tokens and confirm Jira access
jji validate-token github --token "<your-github-token>"
jji validate-token jira --token "<your-jira-token>" --email "you@example.com"
jji jira-projects --jira-token "<your-jira-token>" --jira-email "you@example.com" --query PROJ
jji jira-security-levels PROJ --jira-token "<your-jira-token>" --jira-email "you@example.com"
Use these commands when the browser dialog does not show the Jira project you expect, or when you want to confirm access before filing a bug. For Jira Server/Data Center, omit --email.
Add links or change the AI draft
jji preview-issue job-1 \
--test tests.TestA.test_one \
--type github \
--include-links \
--ai-provider claude \
--ai-model opus-4
--include-links asks JJI to add Jenkins and analysis links to the draft. If the server does not have a public base URL configured, the draft still works, but the references fall back to plain text instead of clickable links.
If the report page shows AI provider and model selectors next to the issue buttons, you can use those instead of CLI flags to change how the draft is written.
Create tickets for child-job failures
jji preview-issue job-1 \
--test tests.TestA.test_one \
--type jira \
--child-job child-runner \
--child-build 5
Use --child-job and --child-build when the failing test came from a pipeline child job rather than the top-level Jenkins job.
Reuse CLI defaults or automate the flow
If you create tracker tickets often, store defaults such as github_token, github_repo_url, jira_token, jira_email, jira_project_key, and jira_security_level in your jji profile instead of repeating them on every command. See CLI Command Reference for the full option list.
Note:
preview-issueandcreate-issueonly send the credentials for the selected--type. GitHub runs ignore Jira credentials, and Jira runs ignore GitHub credentials.
If you need to call the same flow from another tool, see REST API Reference.
Troubleshooting
- The browser dialog will not let me create the ticket: save the matching personal token in
Settings. Preview still works without it. - GitHub creation says no repository URL is available: the analysis did not include a repo target, so JJI has nowhere to file the issue. Re-run the analysis with repository context, or use
--github-repo-urlfrom the CLI. See Copy Common Analysis Recipes for working analysis patterns. - Jira project or issue security choices are missing: validate your Jira token first, and for Jira Cloud include your email.
jji jira-projectsandjji jira-security-levelsshow exactly what your account can access. - The tracker says your token is invalid or expired: run
jji validate-tokenand update the saved token or CLI flag. Similar issuesis empty: duplicate lookup is best effort. You can still review the draft and create the ticket manually.- The GitHub or Jira button is disabled, or
jji capabilitiesshows the tracker as unavailable: the integration is turned off on the server. See Configuration and Environment Reference for the server-side requirements.