From 71cc977aace9bdf84ca39273e12664faf2171360 Mon Sep 17 00:00:00 2001 From: Alexander Hjelm Date: Fri, 13 Oct 2023 10:23:29 +0200 Subject: [PATCH 1/2] Use the EpicLink field from the config when migrating epic links --- src/WorkItemMigrator/JiraExport/JiraMapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WorkItemMigrator/JiraExport/JiraMapper.cs b/src/WorkItemMigrator/JiraExport/JiraMapper.cs index 901d469f..f624accb 100644 --- a/src/WorkItemMigrator/JiraExport/JiraMapper.cs +++ b/src/WorkItemMigrator/JiraExport/JiraMapper.cs @@ -246,7 +246,7 @@ internal List MapLinks(JiraRevision r) } // map epic link - LinkMapperUtils.AddRemoveSingleLink(r, links, _jiraProvider.GetSettings().EpicLinkField, "Epic", _config); + LinkMapperUtils.AddRemoveSingleLink(r, links, _config.EpicLinkField, "Epic", _config); // map parent LinkMapperUtils.AddRemoveSingleLink(r, links, "parent", "Parent", _config); From 56a76002bc2d75006bed1017df8130226bc32b17 Mon Sep 17 00:00:00 2001 From: Alexander Hjelm Date: Tue, 17 Oct 2023 03:12:39 +0200 Subject: [PATCH 2/2] Update faq.md --- docs/faq.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index 3fdcb4eb..94cb851b 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -157,3 +157,25 @@ Here is how we can map datetime fields like ResolvedDate: "target": "Microsoft.VSTS.Common.ResolvedDate" } ``` + +## 9. How to migrate an issue fields to a comment + +Through some manual intervention, we can migrate every historical value of an **issue field** to a **Work Item Comments**. Simply do the following: + +1. Map each of the desired fields to a unique token, e.g.: + ```json + { + "source": "customfield_10112", + "target": "5397700c-5bc3-4efe-b1e9-d626929b89ca" + }, + { + "source": "customfield_10111", + "target": "e0cd3eb0-d8b7-4e62-ba35-c24d06d7f667" + }, + ``` +1. Run `JiraExport` as usual. +1. Open up the `workspace` folder in an IDE like Visual Studio Code and do a search-replace across all contents in the whole `workspace` folder: +1. Replace each unique token with `System.History`: + - `5397700c-5bc3-4efe-b1e9-d626929b89ca` > `System.History` + - `e0cd3eb0-d8b7-4e62-ba35-c24d06d7f667` > `System.History` +1. Run `WiImport` as usual.