Skip to content

Commit

Permalink
Merge branch 'master' into feature/correct-image-links-for-acceptance…
Browse files Browse the repository at this point in the history
…-criteria
  • Loading branch information
Alexander-Hjelm authored Oct 18, 2023
2 parents e7a7b41 + e831745 commit 1dbad99
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/WorkItemMigrator/JiraExport/JiraMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ internal List<WiLink> 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);
Expand Down

0 comments on commit 1dbad99

Please sign in to comment.