Bug Report : System.History field is unreliable for tracking comment changes in Work Item Updates API

Jainil Shah 0 Reputation points
2025-05-04T04:32:16.9233333+00:00

πŸ” Description

The Azure DevOps Work Item Updates API does not consistently provide reliable information for comment-level auditing. The System.History field is often missing or does not accurately reflect which comment was added, updated, or deleted in a given revision. This makes it difficult to track changes to comments over time using the official API.


πŸ” Reproduction Steps

  1. Add a comment to a work item using the Azure DevOps UI or API.
  2. Edit the comment.
  3. Delete the comment.
  4. Fetch the work item update history using the endpoint:

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}/updates?api-version=7.1


πŸ“¦ Sample Response Snippets

πŸ”΄ Comment Deletion (missing identity):

{
  "fields": {
    "System.Rev": {
      "oldValue": 49,
      "newValue": 50
    },
    "System.CommentCount": {
      "oldValue": 28,
      "newValue": 27
    },
    "System.History": {
      "newValue": ""
    }
  }
}

❌ No indication of which comment was deleted.

πŸ”΄ Comment Update (no System.History present):

"fields": {
  "System.Rev": {
    "oldValue": 48,
    "newValue": 49
  },
  "System.ChangedDate": {
    "oldValue": "2025-04-30T02:55:23.387Z",
    "newValue": "2025-04-30T02:55:37.607Z"
  }
}

❌ Comment was updated but no System.History field exists in the response.

πŸ”΄ Comment Addition (no comment text shown):

"fields": {
  "System.CommentCount": {
    "oldValue": 27,
    "newValue": 28
  }
}

❌ Only the count changed. The actual comment content or reference is not visible.

βœ… Expected Behavior

  • For added comments: include commentId or comment text in the revision response.
  • For updated comments: include both previous and new comment content or version references.
  • For deleted comments: return commentId or comment body so the deleted content is auditable.
Azure DevOps
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.