Commit 5b9c300
authored
Ensure Accurate CreatedDate Handling Across Revisions (#3076)
This PR introduces better tracking for CreatedDate across work item
revisions to ensure historical accuracy during migrations. During
validation, we also identified that bulk-edited or bulk-imported work
items can share identical CreatedDate values across revisions, which can
lead to ordering issues during replay.
A similar issue for ChangedDate has been discussed here:
#2216
**Changes**
Revision Management
RevisionItem: Added CreatedDate and OriginalCreatedDate properties to
the data contract.
TfsWorkItemConvertor: Updated to map System.CreatedDate from TFS/ADO
revisions into the RevisionItem.
TfsRevisionManagerTool: Updated EnforceDatesMustBeIncreasing to validate
and fix CreatedDate ordering. This also handles scenarios where bulk
edits or imports caused multiple revisions to share the same timestamp,
ensuring each replayed revision has a strictly increasing CreatedDate.
**Testing**
Verified that CreatedDate is correctly populated during revision
extraction.
Validated that TfsRevisionManagerTool correctly adjusts timestamps when
conflicts occur, including cases where multiple revisions share
identical CreatedDate values.
Built and ran the solution to confirm functionality.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **New Features**
* Revision tracking now captures creation date information alongside
existing change date data, providing more detailed revision history.
* **Improvements**
* Strengthened date consistency validation that independently enforces
chronological ordering for creation and change dates, ensuring all
revision timestamps maintain proper sequential integrity.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->File tree
4 files changed
+21
-9
lines changed- src
- MigrationTools.Clients.TfsObjectModel.Tests/Tools
- MigrationTools.Clients.TfsObjectModel
- Endpoints
- Tools
- MigrationTools/DataContracts
4 files changed
+21
-9
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | | - | |
86 | | - | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| |||
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
174 | | - | |
| 182 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
0 commit comments