ralli/migrate_from_bugzilla — Issue #9: Issue priorities reversed and off-by-one
Author: fnilsen
Created: 2011-10-16 14:52:51+00:00
State: open

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
}