AZ-400: Designing and Implementing Microsoft DevOps Solutions

Configure Activity Traceability and Flow of Work

Demo Repository Integration with Azure Boards

Learn how to link commits and pull requests directly to Azure Boards work items for seamless tracking and enhanced visibility.

Prerequisites

  • An existing Azure DevOps project with Azure Boards enabled
  • A Git repository named Customer Portal in the same project
  • Git CLI and an IDE (e.g., Visual Studio Code)

Step 1: Identify the Work Item

Navigate to Azure Boards and locate the work item you need to address. For this demo, our target is:

  • Work Item ID: 69
  • Title: “Add a sentence to the README file.”

The image shows a screenshot of a work items list from Azure DevOps, displaying tasks with details such as ID, title, assigned person, state, and area path. The tasks are unassigned and marked as "To Do" under the "Customer Portal" area.

Make note of this ID—you’ll need it when linking your commit or pull request.


Step 2: Apply the Code Change

  1. Open the Customer Portal repo in your editor.

  2. Edit README.md to add the required sentence.

  3. Stage your change:

    git add README.md
    

Step 3: Commit with a Work Item Reference

When committing changes, include one of these keywords followed by the work item ID (#69):

  • fixes
  • resolves
  • closes
git commit -m "Add README sentence (fixes #69)"
git push origin main

Note

You can also use the AB#<ID> format in commit messages or PR descriptions to link work items.
Example: git commit -m "Update docs AB#69".

Warning

Ensure your repository is connected to Azure Boards and that you have the correct permissions. Missing the # or using an unsupported keyword will prevent the link from forming.


Return to the work item in Azure Boards (ID 69). In the Development section, you should see the linked commit and any associated pull requests.

The image shows an Azure DevOps interface displaying a repository named "Customer Portal" with files like `azure-pipelines.yml` and `README.md`. The README file contains sections for introduction, getting started, build and test, and contribute.


Quick Reference: Commit Keyword Table

KeywordEffectExample
fixesCloses work item when the commit mergesfixes #69
resolvesSame as fixesresolves #69
closesAlternative close keywordcloses #69
AB#Direct link without auto-close behaviorAB#69

Best Practices

  • Always reference work item IDs in both commit messages and pull request descriptions for clear traceability.
  • Write concise, descriptive commit messages that reflect the scope of the change.
  • Regularly review the Development section in Azure Boards to confirm that links are up to date.
  • Encourage your team to follow this process to maintain project transparency.

Watch Video

Watch video content

Previous
Demo Generating Release Notes