Skip to content

Commit a88584d

Browse files
Merge pull request #1127 from solidify/feature/add-option-to-skip-older-changeddate-error-handling
Add option to skip handling of errors where the supplied ChangedDate was older than the latest revision already in ADO
2 parents 3b3d681 + 2ea35ae commit a88584d

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

azure-pipelines.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ steps:
3737
inputs:
3838
restoreSolution: '**\*.sln'
3939

40-
- task: SonarCloudPrepare@1
41-
displayName: 'Prepare analysis on SonarCloud'
42-
inputs:
43-
SonarCloud: SonarCloud
44-
organization: solidify
45-
projectKey: 'jira-azuredevops-migrator'
46-
projectName: 'jira-azuredevops-migrator'
47-
projectVersion: '$(Build.BuildNumber)'
40+
# 2025-08-26
41+
# Alexander Andersson
42+
# Disabled SonarCloud build tasks due to expired token. The SonarCloud Service Connection does currently not work.
43+
44+
#- task: SonarCloudPrepare@1
45+
# displayName: 'Prepare analysis on SonarCloud'
46+
# inputs:
47+
# SonarCloud: SonarCloud
48+
# organization: solidify
49+
# projectKey: 'jira-azuredevops-migrator'
50+
# projectName: 'jira-azuredevops-migrator'
51+
# projectVersion: '$(Build.BuildNumber)'
4852

4953
- task: VSBuild@1
5054
displayName: 'Build solution WorkItemMigrator'
@@ -53,13 +57,13 @@ steps:
5357
platform: '$(BuildPlatform)'
5458
configuration: '$(BuildConfiguration)'
5559

56-
- task: SonarCloudAnalyze@1
57-
displayName: 'Run Code Analysis'
60+
#- task: SonarCloudAnalyze@1
61+
# displayName: 'Run Code Analysis'
5862

59-
- task: SonarCloudPublish@1
60-
displayName: 'Publish Quality Gate Result'
61-
inputs:
62-
pollingTimeoutSec: '300'
63+
#- task: SonarCloudPublish@1
64+
# displayName: 'Publish Quality Gate Result'
65+
# inputs:
66+
# pollingTimeoutSec: '300'
6367

6468

6569
- task: DotNetCoreCLI@2

docs/faq.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,20 @@ Example `config.json`:
534534
"changeddate-bump-ms": 5,
535535
```
536536

537+
### Disable the built-in error handling for the error message VS402625
538+
539+
If your Importer gets stuck in a loop where it keeps outputting the following line over and over again:
540+
541+
```txt
542+
[W][11:15:29] Received response while updating Work Item: VS402625: Dates must be increasing with each revision.. Bumped Changed Date by 2ms and trying again... New ChangedDate: 3/31/2016 3:21:38 PM, ms: 172
543+
```
544+
545+
You can revert to throwing the error message instead of raising a warning. This may cause the tool to migrate incomplete issue data, but the execution will continue. in order to do this, set the value of **changeddate-bump-ms** to 0 in you config.json, for example:
546+
547+
```json
548+
"changeddate-bump-ms": 0,
549+
```
550+
537551
## 22. Sprint names are corrupted. ADO Iteration paths are named "[ synced = false ]"
538552

539553
The issue is usually that a custom field has been defined in Jira which is also named "Sprint", and the tool is picking up this field instead of the default Srpint field.

src/WorkItemMigrator/WorkItemImport/WitClient/WitClientWrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public WorkItem UpdateWorkItem(JsonPatchDocument patchDocument, int workItemId,
126126
{
127127
// Handle 'VS402625' error responses, the supplied ChangedDate was older than the latest revision already in ADO.
128128
// We must bump the ChangedDate by a small factor and try again.
129-
if (ex2.Message.Contains("VS402625"))
129+
if (ex2.Message.Contains("VS402625") && ChangedDateBumpMS > 0)
130130
{
131131
foreach (var patchOp in patchDocument)
132132
{
@@ -143,7 +143,7 @@ public WorkItem UpdateWorkItem(JsonPatchDocument patchDocument, int workItemId,
143143
}
144144
// Handle 'VS402624' error responses, the supplied ChangedDate was in the future.
145145
// We must wait a while and try again.
146-
else if (ex2.Message.Contains("VS402624"))
146+
else if (ex2.Message.Contains("VS402624") && ChangedDateBumpMS > 0)
147147
{
148148
Logger.Log(LogLevel.Warning, $"Received response while updating Work Item: {ex2.Message}." +
149149
$" Waiting and trying again...");

0 commit comments

Comments
 (0)