LogoLogo
Book a demoLog in
  • Swarmia documentation
  • Getting started
    • Get started in 15 minutes
    • Integrations
      • GitHub
        • GitHub Enterprise Server
        • Multiple GitHub organizations
        • Forked repositories
        • Troubleshooting
          • Reinstalling the Swarmia GitHub app
          • Updating app permissions
          • Installing Swarmia outside of GitHub Marketplace
      • Jira
        • Jira Server and Jira Data Center
        • Multiple Jira organizations
      • Linear
        • Private Linear teams
        • Disconnect Linear
      • Slack
        • Private Slack channels
      • Authentication
        • Google Single Sign-On
          • Frequently asked questions
        • Okta Single Sign-On
      • HR systems
      • Data export
        • Data cloud
        • Export data as a CSV file
      • Other integrations
        • Other issue tracker integrations
        • Other source code hosting integrations
  • Configuration and data quality
    • Teams & members
      • Creating & managing teams
        • Teams API
      • Contributors
      • Roles and permissions
      • Inviting team members
    • Issue tracker configuration
      • Jira configuration
      • Jira best practices
      • Linear configuration
    • Pull request exclusions
    • Linking pull requests to issues
    • Investment categories
    • Deployments
      • Generate deployments from merged pull requests
      • Generate deployments from GitHub deployments
      • Generate deployments from GitHub checks
      • Generate deployments via the API
        • Generate deployments for monorepos via the API
    • Sprint configuration
  • Use cases
    • Improve pull request flow
      • Pull request insights
      • Reducing pull request cycle time
      • Review code faster
      • Managing pull requests in progress with the Pull Request view
      • Diagnosing low pull request throughput
      • Analyzing pull request batch size
  • Improve your team's focus
    • Optimizing issue cycle time
    • Analyzing activity patterns on Work Log
    • Grouping activity on the Work Log view
    • Focus summary
  • Balance engineering investments
    • Activity and effort-based models
    • Categorizing work
    • Common problems with balancing engineering investment
  • Deliver strategic initiatives
    • Forecasting initiatives
  • Capitalize software development costs
  • Run developer experience surveys
    • Creating a survey
    • Managing surveys
    • Viewing and sharing survey results
    • How we show your survey responses
    • Survey communication guide and templates
  • Track DORA metrics
    • Automatic change failure detection
    • How Swarmia links PRs to deployments
  • Coach software developers
  • Get visibility into your CI pipeline
  • Continuous improvement
    • Working agreements
  • Notifications
    • Team notifications
    • Personal notifications
  • Retrospectives with Swarmia
  • Metrics & definitions
    • Pull request cycle time
      • What's the difference between "Change lead time" and "Pull request cycle time" metrics in Swarmia?
    • Issue cycle time
      • Defining issue lifecycle and cycle time
    • Developer effort (FTEs)
  • DORA metrics
    • Change lead time
    • Deployment frequency
    • Mean time to recovery
    • Change failure rate
  • Throughput
  • Time to deploy
  • Batch size
  • Flow efficiency
  • Scope creep
  • Sprints
  • Frequently asked questions
    • How do you treat weekends in metrics?
    • Tracking squashed commits
    • How do merge queues affect my metrics?
    • Why is my commit not visible in Swarmia?
    • How do I account for people leaving my organization?
  • Resources
    • Security & data retention
      • Data security
      • Data access
      • Swarmia IP Addresses
      • Single Sign-On (SSO) / SAML
      • Can I get a copy of the SOC 2 Type II audit report?
      • Deleting your organization
  • Pricing & plans
    • Compare plans
    • Free plan
    • Do I need a credit card to start a free trial?
    • What are the differences between the individual modules and the standard plan?
    • How do you determine the number of developers for billing?
    • What happens to customers with the Lite plan after the December 2024 pricing and plan change?
  • Changelog
On this page
  • Why linking pull requests to issues is important
  • Automatically detecting the issue link
  • AI suggested issue links
  • Manually linking pull requests to issues

Was this helpful?

  1. Configuration and data quality

Linking pull requests to issues

Linking pull requests to issues allows you to group work by issues. This article describes the ways Swarmia can detect which issue a pull request is related to.

PreviousPull request exclusionsNextInvestment categories

Last updated 7 days ago

Was this helpful?

Why linking pull requests to issues is important

Linking pull requests to issues enables Swarmia to give you deeper insights into your work. Otherwise, we can't know what coding activity happened in an issue, meaning that we can only show you data from your issue tracker, giving a limited view to what actually happened.

A high linking rate is essential for making these features (and more) work well:

  • Investment balance

  • Software capitalization

  • Work log by issue

  • Initiatives

Automatically detecting the issue link

If you use Jira or Linear with their respective plugins that label PRs to link them to their issue, we’ll leverage that information. In addition, Swarmia can automatically detect Issue links from PRs in any of the following ways:

  • Mention the issue key in the Pull Request title (e.g. Foobar [CLOUD-123])

  • Mention the issue key at the beginning of the Pull Request description (e.g. CLOUD-123 description description description)

  • Add the issue key URL (e.g.) in the Pull Request description.

  • Start the Branch name in GitHub with the issue key (e.g. CLOUD-123-foo) or use it after a slash (e.g. myname/bug/CLOUD-123-foo)

AI suggested issue links

Swarmia can automatically suggest you relevant issues for a pull request based on the pull request and issue metadata. When a developer merges a pull request, for which we could not automatically determine the issue link, the Swarmia Slack bot will send them a message with suggested issue links:

You can also manually search for the right issue, or link the pull request to an investment category if no relevant issue exists.

For these notifications to be enabled, these conditions need to be met:

  1. The author of the pull request must have Personal notifications enabled

Manually linking pull requests to issues

It's also possible to manually link pull requests to issues from the Swarmia UI. Open the pull request popup from any view by clicking on a pull request, and you can change the issue and investment category that it is linked to:

The team that the author belongs to must have adopted the "Link pull requests to issues"

https://acme.atlassian.net/browse/CLOUD-123
working agreement
Swarmia bot sends a Slack message where the developer can quickly link the pull request to the relevant issue or investment category
The pull request popup allows you to change its linked issue and investment category