PR to Ticket

circle-info

Supported Ticket providers: Jira, Linear, GitHub Issues, GitLab Issues

The create_ticket tool automatically generates tickets in your ticket tracking system (Jira, Linear, GitHub Issues, or GitLab Issues) based on PR content.

It analyzes the PR’s data — including code changes, commit messages, and the PR description — to create well-structured tickets that capture the essence of the development work. This helps teams maintain traceability between code changes and project management systems.

When a ticket is created, it is added to the PR description under an Auto-created Ticket section, complete with a link to the generated ticket.

How to use the create_ticket tool

Pre-requisites

To use this tool, you must integrate your ticketing system with Qodo. See the Ticket Compliance Documentation for setup instructions.

  • Jira Cloud users: re-integrate your connection through the Qodo integration page to enable the update permission required for ticket creation.

  • Configure the project key for the repository where the PR is created by adding default_project_key to your configuration:


Automatic Ticket Creation

The tool can automatically create tickets when:

  • A PR is opened or updated

  • The PR does not already have an associated ticket

To enable automatic ticket creation, add the following to your .pr_agent.toml configuration:

This ensures that every code change is documented in the ticketing system without manual intervention.


Interactive Ticket Creation via Compliance Tool

circle-info

Supported only on GitHub and GitLab

The tool can be triggered interactively via a checkbox in the Compliance Tool during the PR Compliance Review workflow:

  1. Check the Create ticket box in the Compliance Tool.

  2. The tool will create the ticket and update the PR Description with an Auto-created Ticket section containing the link.

  3. Click Update in the Ticket Compliance section to finalize.


Manual Ticket Creation

You can trigger ticket creation manually from any PR by commenting:

Once triggered, the tool will create the ticket and update the PR Description with an Auto-created Ticket section containing the link.


Configuration Options

Configure the create_ticket tool by setting configurations under the pr_to_ticket part in your configuration file.

default_project_key

(none)

The default project key for your ticketing system (e.g., "SCRUM"). Required unless fallback_to_git_provider_issues is true.

default_base_url

(none)

If your organization uses multiple ticketing systems, you can set the default base URL here (e.g., https://YOUR-ORG.atlassian.net). Tickets will be created in this system by default.

fallback_to_git_provider_issues

false

If set to true, the tool will create issues in the Git provider's tracker (GitHub/GitLab) when default_project_key is not configured.


Compliance Benefits

The create_ticket tool supports SOC-2 compliance by automatically creating tickets from PRs and establishing bidirectional links between them. This ensures every code change is traceable to its corresponding business requirement or task.

Last updated