Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom field mapping to Microsoft.VSTS.TCM.ReproSteps is ignored #56

Closed
contactsimonwilson opened this issue May 19, 2019 · 5 comments
Closed

Comments

@contactsimonwilson
Copy link

contactsimonwilson commented May 19, 2019

Mapping any field other than description to Microsoft.VSTS.TCM.ReproSteps does not work as expected. Instead of copying the field details from the specified field (eg a custom repro steps field in Jira), the contents from the description field are used.

This occurs because the description field is always mapped to the repro steps field for bugs by the first line in the MapLastDescription method inside the JiraMapper class.

  private void MapLastDescription(List<WiRevision> revisions, JiraItem issue)
        {
            var descFieldName = issue.Type == "Bug" ? "Microsoft.VSTS.TCM.ReproSteps" : "System.Description";

Sample config:

      {
        "source": "Steps to Reproduce",
        "source-type": "name",
        "target": "Microsoft.VSTS.TCM.ReproSteps",
        "for": "Bug"
      },
@MOlausson
Copy link
Member

@contactsimonwilson appoligies for the delayed response here. What type of field are you using instead of repro step for your mapping? Agree it should not be hard-coded as it is and we'll adress it.

@beverts312
Copy link
Contributor

This same code also causes custom field mapping description mappings to get overridden on non bug types.

@beverts312
Copy link
Contributor

@MOlausson is the intention behind MapLastDescription just to try and make it so you dont have to define the Description/Steps to Reproduce mappings?

It seems like the easiest fix would be to just remove this method, I am running migrations with https://github.com/solidify/jira-azuredevops-migrator/blob/master/src/WorkItemMigrator/JiraExport/JiraMapper.cs#L135 commented out and everything works as expected.

@MOlausson
Copy link
Member

@madkoo can you check this one in retrospect of the improvements you've made to field handling?

@MOlausson
Copy link
Member

Fixed from v2.2.88.

@MOlausson MOlausson moved this from Ready for test to Done in jira-azuredevops-migrator Nov 29, 2019
@MOlausson MOlausson moved this from Done to Released/closed in jira-azuredevops-migrator Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
jira-azuredevops-migrator
  
Released/closed
Development

No branches or pull requests

4 participants