mpercy / jira-migration-tools

Tools for migrating between JIRA instances
Apache License 2.0
5 stars 6 forks source link

Voter usernames should be capitalized correctly #4

Open jbapple-cloudera opened 7 years ago

jbapple-cloudera commented 7 years ago

In JSON export, JIRA does not capitalize the usernames of voters as those usernames are capitalized in the other contexts. In fact, it forces them to all lowercase. Those lowercase usernames, if different from the true username, then cause issue imports to fail with messages like:

2017-02-06 15:28:28,031 ERROR - Error importing issue [externalId='null', summary='last_value()/first_value() support for IGNORE NULLS']
com.atlassian.jira.plugins.importer.external.ExternalException: No such user: holgerl
    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importVoters(DefaultJiraDataImporter.java:1142)
    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:956)
    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:798)
    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:414)
    at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
    at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
    at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:453)
    at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:421)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
    at java.lang.Thread.run(Thread.java:745)

Here the issue includes the mapping:

      "voters" : [ "paolam" ],

And the users section of the export includes:

...
  }, {
    "name" : "PaolaM",
    "fullname" : "Paola M.",
...

Those usernames should be re-normalized properly in remap_users.py