title: Azure DevOps Linked Work Items in pipeline
body: <p>How does Azure DevOps identify linked workitems during pipeline (Azure DevOps YAML)?</p>
  
  <p>I believe it is supposed to get only the workitems linked to new commits (i.e. commits which were not included in a previous pipeline)</p>
  
  <p>However, it sometimes seems to link all work items. But this does not always happen. I did not manage to identify the pattern yet. But I noticed that when I do a change in the pipeline YAML, it seems to trigger this behaviour that links all work items again (even if they where linked to a previous commit and not to newly included commits).</p>
  
  <h1>Updated to include additional information</h1>
  
  <h3> This is my build pipeline YAML </h3>
  
  <pre><code>name: 03.01.00$(Rev:.r)
  pool:
    name: Hosted VS2017
    demands:
    - msbuild
    - visualstudio
    - vstest
  
  steps:
  - checkout: self
    clean: true
    persistCredentials: true
  
  - task: NuGetCommand@2
    displayName: 'NuGet restore'
    inputs:
      restoreSolution: MySol/MySol.sln
  
  - task: VSBuild@1
    displayName: MySol/MySol.sln
    inputs:
      solution: MySol/MySol.sln
      vsVersion: 15.0
  
  - task: WorkItemUpdater@2
    inputs:
      workitemsSource: 'Build'
      workItemType: 'Task,Bug'
      updateAssignedTo: 'Never'
      updateFields: 'Microsoft.VSTS.Build.IntegrationBuild,v$(Build.BuildNumber)'
  
  - task: VSTest@2
    displayName: 'VsTest - testAssemblies'
  </code></pre>
  
  <h3>Pipeline settings:</h3>
  
  <p><strong>Processing od new run requests:</strong> Enabled</p>
  
  <p><strong>Automatically link work items included in this run:</strong> checked &amp; dev branch selected</p>
  
  <hr>
  
  <h3>Triggers:</h3>
  
  <p><strong>Override the YAML continuous integration trigger from here:</strong> checked</p>
  
  <p><strong>Enable continuous integration:</strong> checked</p>
  
  <p><strong>Batch changes while a build is in progress:</strong> unchecked</p>
  
  <h3>Branch filters</h3>
  
  <p>Included dev branch + another feature branch</p>
  
  <h3>Path filters</h3>
  
  <p>None</p>