Skip to content

Commit

Permalink
Update build title and isPrerelease output (#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh authored Jun 28, 2024
1 parent 2772b19 commit f4f9b65
Show file tree
Hide file tree
Showing 10 changed files with 208 additions and 198 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Azure DevOps Migration Tools [![GitHub release](https://img.shields.io/github/release/nkdAgility/vsts-sync-migration.svg)](https://github.com/nkdAgility/azure-devops-migration-tools/releases) ![Build on VSTS](https://nkdagility.visualstudio.com/_apis/public/build/definitions/1b52ce63-eccc-41c8-88f9-ae6ebeefdc63/94/badge)
# Azure DevOps Migration Tools [![GitHub release](https://img.shields.io/github/release/nkdAgility/vsts-sync-migration.svg)](https://github.com/nkdAgility/azure-devops-migration-tools/releases) ![GitHub pre-release](https://img.shields.io/github/v/release/nkdagility/vsts-sync-migration?include_prereleases)

The Azure DevOps Migration Tools allow you to bulk edit and migrate data between Team Projects on both Microsoft Team Foundation Server (TFS) and Azure DevOps Services. Take a look at the [documentation](https://nkdagility.com/docs/azure-devops-migration-tools/) to find out how. This project is published as [code on GitHub](https://github.com/nkdAgility/azure-devops-migration-tools/) as well as a Winget package a `nkdAgility.AzureDevOpsMigrationTools`.

Expand Down
11 changes: 7 additions & 4 deletions build/azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,11 @@ stages:
gitHubConnection: 'GitHub connection 4'
tagSource: userSpecifiedTag
tag: 'v$(Build.BuildNumber)'
title: 'v$(Build.BuildNumber) - $(Build.SourceVersionMessage)'
title: 'Azure DevOps Migration Tools v$(Build.BuildNumber)'
releaseNotesSource: inline
releaseNotesInline: |
$(prbody)
assets: |
assets: |
$(System.ArtifactsDirectory)/drop/*.zip
$(System.ArtifactsDirectory)/drop/*.vsix
$(System.ArtifactsDirectory)/drop/*.nupkg
Expand Down Expand Up @@ -557,8 +557,11 @@ stages:
inputs:
targetType: 'inline'
script: |
Write-Host "isPreRelease: $(isPreRelease)";
$isPreRelease = $(isPreRelease);
Write-Host "isPreRelease(incomming): $(isPreRelease)";
$isPreRelease = "$(isPreRelease)" -eq "true";
Write-Host "isPreRelease: $isPreRelease";
Write-Host "isPreRelease(type): $isPreRelease.GetType().Name";
if ($isPreRelease)
{
Write-Host "PreRelease"
Expand Down
39 changes: 8 additions & 31 deletions docs/Reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,43 +175,20 @@ The global configuration created by the `init` command look like this:
"Processors": [
{
"$type": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"AttachRevisionHistory": false,
"MaxRevisions": 0,
"PrefixProjectToNodes": false,
"Enabled": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": false,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
"WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": true,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"LinkMigrationSaveEachAsAdded": false,
"AttachRevisionHistory": false,
"GenerateMigrationComment": true,
"UseCommonNodeStructureEnricherConfig": false,
"NodeBasePaths": [
"Product\\Area\\Path1",
"Product\\Area\\Path2"
],
"IterationMaps": {
"^OriginalProject\\\\Path1(?=\\\\Sprint 2022)": "TargetProject\\AnotherPath\\NewTeam",
"^OriginalProject\\\\Path1(?=\\\\Sprint 2020)": "TargetProject\\AnotherPath\\Archives\\Sprints 2020",
"^OriginalProject\\\\Path2": "TargetProject\\YetAnotherPath\\Path2"
},
"AreaMaps": {
"^OriginalProject\\\\(DescopeThis|DescopeThat)": "TargetProject\\Archive\\Descoped\\",
"^OriginalProject\\\\(?!DescopeThis|DescopeThat)": "TargetProject\\NewArea\\"
},
"WorkItemIDs": null
"WorkItemIDs": null,
"MaxGracefulFailures": 0,
"SkipRevisionWithInvalidIterationPath": false,
"SkipRevisionWithInvalidAreaPath": false
},
{
"$type": "TestConfigurationsMigrationConfig",
Expand Down
36 changes: 2 additions & 34 deletions docs/Reference/v1/Processors/WorkItemMigrationContext-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,24 @@ The Work Item queries are all built using Work Item [Query Language (WIQL)](http

You can use the [WIQL Editor](https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor) to craft a query in Azure DevOps.

Typical way that queries are built:

```
var targetQuery =
string.Format(
@"SELECT [System.Id], [{ReflectedWorkItemIDFieldName}] FROM WorkItems WHERE [System.TeamProject] = @TeamProject {WIQLQueryBit} ORDER BY {WIQLOrderBit}",
Engine.Target.Config.ReflectedWorkItemIDFieldName,
_config.WIQLQueryBit,
_config.WIQLOrderBit
);
var targetFoundItems = Engine.Target.WorkItems.GetWorkItems(targetQuery);
```

A simple example config:

```
"WIQLQueryBit": "AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc"
```
Scope to Area Path (Team data):

```
"WIQLQueryBit": "AND [System.AreaPath] UNDER 'project\Team 1\' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
```

```
"WIQLQueryBit": "AND [System.ChangedDate] > 'project\Team 1\' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.AreaPath] UNDER 'project\Team 1\' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc"
```

## <a name="NodeBasePath"></a>NodeBasePath Configuration

<<<<<<< HEAD
Moved to the ProcessorEnricher [TfsNodeStructure](/Reference/v2/ProcessorEnrichers/TfsNodeStructure/)

# Iteration Maps and Area Maps

Moved to the ProcessorEnricher [TfsNodeStructure](/Reference/v2/ProcessorEnrichers/TfsNodeStructure/)
=======
Moved to the ProcessorEnricher [TfsNodeStructure](../Reference/v2/ProcessorEnrichers/TfsNodeStructure/)

# Iteration Maps and Area Maps

Moved to the ProcessorEnricher [TfsNodeStructure](../Reference/v2/ProcessorEnrichers/TfsNodeStructure/)
>>>>>>> origin/master



Expand Down Expand Up @@ -86,8 +58,4 @@ A complete list of [FieldMaps](../Reference/v1/FieldMaps/index.md) are available
# Removed Properties

<<<<<<< HEAD
- PrefixProjectToNodes - This option was removed in favour of the Area and Iteration Maps on [TfsNodeStructure](/Reference/v2/ProcessorEnrichers/TfsNodeStructure/)
=======
- PrefixProjectToNodes - This option was removed in favour of the Area and Iteration Maps on [TfsNodeStructure](../Reference/v2/ProcessorEnrichers/TfsNodeStructure/)
>>>>>>> origin/master
104 changes: 82 additions & 22 deletions docs/_includes/sampleConfig/configuration-WorkItemTracking.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,41 +118,101 @@
],
"GitRepoMapping": null,
"LogLevel": "Information",
"CommonEnrichersConfig": null,
"CommonEnrichersConfig": [
{
"$type": "TfsNodeStructureOptions",
"RefName": "TfsNodeStructure",
"Enabled": true,
"NodeBasePaths": [],
"AreaMaps": {
"^migrationSource1([\\\\]?.*)$": "MigrationTest5$1",
"^nkdProducts([\\\\]?.*)$": "MigrationTest5$1",
"^Skypoint Cloud$": "MigrationTest5"
},
"IterationMaps": {
"^migrationSource1([\\\\]?.*)$": "MigrationTest5$1",
"^nkdProducts([\\\\]?.*)$": "MigrationTest5$1",
"^Skypoint Cloud\\\\Sprint 1$": "MigrationTest5\\Sprint 1"
},
"ShouldCreateMissingRevisionPaths": true,
"ReplicateAllExistingNodes": true
},
{
"$type": "TfsTeamSettingsEnricherOptions",
"Enabled": true,
"MigrateTeamSettings": true,
"UpdateTeamSettings": true,
"MigrateTeamCapacities": true,
"Teams": null
},
{
"$type": "TfsWorkItemLinkEnricherOptions",
"RefName": "TfsWorkItemLinkEnricher",
"Enabled": true,
"FilterIfLinkCountMatches": true,
"SaveAfterEachLinkIsAdded": false
},
{
"$type": "TfsRevisionManagerOptions",
"RefName": "TfsRevisionManager",
"Enabled": true,
"ReplayRevisions": true,
"MaxRevisions": 0
},
{
"$type": "TfsAttachmentEnricherOptions",
"RefName": "TfsAttachmentEnricher",
"Enabled": true,
"ExportBasePath": "c:\\temp\\WorkItemAttachmentExport",
"MaxRevisions": 480000000
},
{
"$type": "StringManipulatorEnricherOptions",
"RefName": "StringManipulator",
"Enabled": true,
"MaxStringLength": 1000000,
"Manipulators": [
{
"$type": "RegexStringManipulator",
"Enabled": true,
"Pattern": "[^( -~)\n\r\t]+",
"Replacement": "",
"Description": "Remove invalid characters from the end of the string"
}
]
},
{
"$type": "TfsUserMappingEnricherOptions",
"RefName": "TfsUserMappingEnricher",
"Enabled": true,
"UserMappingFile": "C:\\temp\\userExport.json",
"IdentityFieldsToCheck": [
"System.AssignedTo",
"System.ChangedBy",
"System.CreatedBy",
"Microsoft.VSTS.Common.ActivatedBy",
"Microsoft.VSTS.Common.ResolvedBy",
"Microsoft.VSTS.Common.ClosedBy"
]
}
],
"Processors": [
{
"$type": "WorkItemMigrationConfig",
"Enabled": false,
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
"WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request') ORDER BY [System.ChangedDate] desc",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": true,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"AttachRevisionHistory": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": true,
"WorkItemIDs": null,
"MaxRevisions": 0,
"NodeStructureEnricherEnabled": null,
"UseCommonNodeStructureEnricherConfig": false,
"NodeBasePaths": [
"Product\\Area\\Path1",
"Product\\Area\\Path2"
],
"AreaMaps": {},
"IterationMaps": {},
"MaxGracefulFailures": 0,
"SkipRevisionWithInvalidIterationPath": false
"SkipRevisionWithInvalidIterationPath": false,
"SkipRevisionWithInvalidAreaPath": false
}
],
"Version": "0.0",
Expand Down
Loading

0 comments on commit f4f9b65

Please sign in to comment.