Skip to content

Commit

Permalink
Merge pull request #827 from solidify/feature/map-issuetype
Browse files Browse the repository at this point in the history
Enable mapping of issueType
  • Loading branch information
Alexander-Hjelm authored Aug 20, 2023
2 parents f4aa948 + 76d73d8 commit 8cad1d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/WorkItemMigrator/JiraExport/JiraItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ private static Dictionary<string, object> ExtractFields(string key, JObject remo
{ "reporter", extractAccountIdOrUsername},
{ jira.GetSettings().SprintField, t => string.Join(", ", ParseCustomField(jira.GetSettings().SprintField, t, jira)) },
{ "status", extractName },
{ "parent", t => t.ExValue<string>("$.key") }
{ "parent", t => t.ExValue<string>("$.key") },
{ "issuetype", extractName }
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,16 @@ public void When_a_custom_field_is_added_Then_a_customfield_is_added_to_the_revi
string customFieldName = _fixture.Create<string>();

var fields = JObject.Parse(@"{'issuetype': {'name': 'Story'},'"+ customFieldId + @"': {'name':'SomeValue'}}");
var renderedFields = new JObject();

var changelog = new List<JObject>();

JObject remoteIssue = new JObject
{
{ "id", issueId },
{ "key", issueKey },
{ "fields", fields }
{ "fields", fields },
{ "renderedFields", renderedFields }
};

provider.DownloadIssue(default).ReturnsForAnyArgs(remoteIssue);
Expand Down Expand Up @@ -634,14 +636,16 @@ public void When_a_custom_field_is_added_Then_no_customfield_is_added_to_the_rev
string customFieldName = _fixture.Create<string>();

var fields = JObject.Parse(@"{'issuetype': {'name': 'Story'},'" + customFieldId + @"': {'name':'SomeValue', 'key':'"+ customFieldId + "'}}");
var renderedFields = new JObject();

var changelog = new List<JObject>();

JObject remoteIssue = new JObject
{
{ "id", issueId },
{ "key", issueKey },
{ "fields", fields }
{ "fields", fields },
{ "renderedFields", renderedFields }
};

provider.DownloadIssue(default).ReturnsForAnyArgs(remoteIssue);
Expand Down

0 comments on commit 8cad1d4

Please sign in to comment.