Search code examples
gittfsazure-devopstfs-workitem

TFS Cannot complete Product Backlog Item because there is no transition from "Committed" with the action "Microsoft.VSTS.Action.CheckIn"


We have an on-prem TFS 2018 Update 2 instance and are running into an issue during this workflow:

  • Create a product backlog item
  • Write code
  • Create a pull request and associate the product backlog item with it
  • Complete the code review and mark the pull request as approved
  • Click "Complete" and the pull request is merged into master. Associated items should be marked as Done but are not and instead their State doesn't change.

I just noticed this yellow error message popup after clicking Approve:

VS1640134: Cannot complete Product Backlog Item 10275 because there is no transition from 'Committed' with the action "Microsoft.VSTS.Actions.Checkin". Learn more

(1 more work item will not be completed)

I can't find anything on that error code VS1640134 and we're just using regular agile scrum work items without any added or custom fields.

The message referenced this article: https://learn.microsoft.com/en-us/vsts/work/customize/reference/automate-field-assignments-state-transition-reason?view=vsts

VSTS twitter support pointed me to this article: https://learn.microsoft.com/en-us/vsts/work/work-items/guidance/scrum-process-workflow?toc=%2Fvsts%2Fwork%2Fwork-items%2Ftoc.json&bc=%2Fvsts%2Fwork%2Fbreadcrumb%2Ftoc.json&view=vsts#track-progress

But neither seem to explain how to resolve the problem. Does anyone know how to resolve this?

UPDATE: After forgetting about this problem it was pushed back up on my agenda. I reviewed the answer that's now marked as accepted and that process generally worked. I made the following edits to the default items:

Project Backlog Item XML:

        <TRANSITION from="New" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
          <ACTIONS>  
            <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS> 
        </TRANSITION>
        <TRANSITION from="Approved" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
          <ACTIONS>  
            <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS> 
        </TRANSITION>
        <TRANSITION from="Committed" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
          <ACTIONS>  
            <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS> 
        </TRANSITION>

Bug XML:

        <TRANSITION from="New" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
          <ACTIONS>  
            <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS> 
        </TRANSITION>
        <TRANSITION from="Approved" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
          <ACTIONS>  
            <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS> 
        </TRANSITION>
        <TRANSITION from="Committed" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
          <ACTIONS>  
            <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS> 
        </TRANSITION>

Solution

  • According to the provided link, you need to export your PBI's XML, and in the transition "from Committed" to another state you need to add these lines:

     <ACTIONS>  
      <ACTION value="microsoft.vsts.actions.checkin"/>  
     </ACTIONS> 
    

    For example:

     <TRANSITION from="Committed" to="Ready To Build">  
       <REASONS>
         ....
       </REASONS>
          <ACTIONS>  
          <ACTION value="microsoft.vsts.actions.checkin"/>  
          </ACTIONS>  
    </TRANSITION>
    

    Then you need to import back the XML file into the TFS.

    For more information about export/import: Click Here