ralli / migrate_from_bugzilla

bugzilla to redmine migration rake task
15 stars 14 forks source link

Issue priorities reversed and off-by-one #9

Closed fnilsen closed 13 years ago

fnilsen commented 13 years ago

I believe the issue priority hash map is reversed and off by one:

PRIORITY_MAPPING = {
     "P1" => priorities[1], # low
     "P2" => priorities[2], # normal
     "P3" => priorities[3], # high
     "P4" => priorities[4], # urgent
     "P5" => priorities[5]  # immediate
}

The priorities array starts at 0. As for reversed, we have always used P1 == highest priority - I'm not sure if there's an official Bugzilla convention for this, but I thought I'd mention it anyway.

For our migration, I had to change the mapping as follows:

PRIORITY_MAPPING = {
     "P5" => priorities[0], # low
     "P4" => priorities[1], # normal
     "P3" => priorities[2], # high
     "P2" => priorities[3], # urgent
     "P1" => priorities[4]  # immediate
 }
ralli commented 13 years ago

Thank you for the bug report. You are absolutely right. i had to revert the priorities.