Linking Code Changes to the Originating Feature or Defect

Pattern name: Code traceability

About this Pattern

When dealing with millions of lines of code, it’s very important to know why the code was written in the first place. That means linking the code changes to the originating feature or defect. However, doing so manually is both tedious and error prone.

This integration pattern automates code traceability by automatically linking software requirements and defects to the lines of source code that implement them.  

Two flavors exist for this pattern:

  • Upon code commit, update an existing artifact (requirement, user story, defect or task) with the link to the changeset.
  • Upon code commit, create a new artifact for the changeset and link it to an existing artifact (requirement, user story, defect or task).

Integration Pattern Linking Code Changes to the Originating Feature or Defect

Benefits

  • Ensure every line of code is traceable back to its originating feature or defect. This is exceptionally important for any safety critical product and products designed for decades of use and maintenance (e.g. airplanes).

Artifacts Typically Synchronized

Code Changes

Implementation Artifacts

  • Changesets

  • Requirements

  • User Stories

  • Tasks

  • Defects

Example of this Pattern