Commit ac905a58 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 488931: Change the default priority values to be human-readable words instead of P1, P2, etc.

Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
parent dc4608b9
...@@ -65,7 +65,7 @@ use constant ISOLATION_LEVEL => 'REPEATABLE READ'; ...@@ -65,7 +65,7 @@ use constant ISOLATION_LEVEL => 'REPEATABLE READ';
use constant ENUM_DEFAULTS => { use constant ENUM_DEFAULTS => {
bug_severity => ['blocker', 'critical', 'major', 'normal', bug_severity => ['blocker', 'critical', 'major', 'normal',
'minor', 'trivial', 'enhancement'], 'minor', 'trivial', 'enhancement'],
priority => ["P1","P2","P3","P4","P5"], priority => ["Highest", "High", "Normal", "Low", "Lowest", "---"],
op_sys => ["All","Windows","Mac OS","Linux","Other"], op_sys => ["All","Windows","Mac OS","Linux","Other"],
rep_platform => ["All","PC","Macintosh","Other"], rep_platform => ["All","PC","Macintosh","Other"],
bug_status => ["UNCONFIRMED","NEW","ASSIGNED","REOPENED","RESOLVED", bug_status => ["UNCONFIRMED","NEW","ASSIGNED","REOPENED","RESOLVED",
......
...@@ -158,7 +158,7 @@ def ensure_defaults(data): ...@@ -158,7 +158,7 @@ def ensure_defaults(data):
if 'bug_file_loc' not in data: if 'bug_file_loc' not in data:
data['bug_file_loc'] = 'http://' # Yes, Bugzilla needs this data['bug_file_loc'] = 'http://' # Yes, Bugzilla needs this
if 'priority' not in data: if 'priority' not in data:
data['priority'] = 'P2' data['priority'] = 'Normal'
def validate_fields(data): def validate_fields(data):
# Fields for validation # Fields for validation
......
...@@ -606,25 +606,25 @@ sub write_bugs { ...@@ -606,25 +606,25 @@ sub write_bugs {
# Mapping from Severity,Priority to priority # Mapping from Severity,Priority to priority
# At our site, the Severity,Priority fields have degenerated # At our site, the Severity,Priority fields have degenerated
# into a 9-level priority field. # into a 9-level priority field.
my($priority) = "P1"; my($priority) = "Highest";
if (defined($pr_data{"Severity"}) && defined($pr_data{"Severity"})) { if (defined($pr_data{"Severity"}) && defined($pr_data{"Severity"})) {
if ($pr_data{"Severity"} eq "critical") { if ($pr_data{"Severity"} eq "critical") {
if ($pr_data{"Priority"} eq "high") { if ($pr_data{"Priority"} eq "high") {
$priority = "P1"; $priority = "Highest";
} else { } else {
$priority = "P2"; $priority = "High";
} }
} elsif ($pr_data{"Severity"} eq "serious") { } elsif ($pr_data{"Severity"} eq "serious") {
if ($pr_data{"Priority"} eq "low") { if ($pr_data{"Priority"} eq "low") {
$priority = "P4"; $priority = "Low";
} else { } else {
$priority = "P3"; $priority = "Normal";
} }
} else { } else {
if ($pr_data{"Priority"} eq "high") { if ($pr_data{"Priority"} eq "high") {
$priority = "P4"; $priority = "Low";
} else { } else {
$priority = "P5"; $priority = "Lowest";
} }
} }
} }
......
...@@ -552,19 +552,19 @@ class Bugzillabug(object): ...@@ -552,19 +552,19 @@ class Bugzillabug(object):
priority = self.fields["Priority"] priority = self.fields["Priority"]
if severity == "critical": if severity == "critical":
if priority == "high": if priority == "high":
self.fields["priority"] = "P1" self.fields["priority"] = "Highest"
else: else:
self.fields["priority"] = "P2" self.fields["priority"] = "High"
elif severity == "serious": elif severity == "serious":
if priority == "low": if priority == "low":
self.fields["priority"] = "P4" self.fields["priority"] = "Low"
else: else:
self.fields["priority"] = "P3" self.fields["priority"] = "Normal"
else: else:
if priority == "high": if priority == "high":
self.fields["priority"] = "P4" self.fields["priority"] = "Low"
else: else:
self.fields["priority"] = "P5" self.fields["priority"] = "Lowest"
self.fields["priority"] = SqlQuote(self.fields["priority"]) self.fields["priority"] = SqlQuote(self.fields["priority"])
state = self.fields["State"] state = self.fields["State"]
if (state == "open" or state == "analyzed") and self.fields["userid"] != 3: if (state == "open" or state == "analyzed") and self.fields["userid"] != 3:
......
...@@ -213,10 +213,8 @@ as described below. ...@@ -213,10 +213,8 @@ as described below.
<h2><a name="priority">Priority</a></h2> <h2><a name="priority">Priority</a></h2>
This field describes the importance and order in which [% terms.abug %] This field describes the importance and order in which [% terms.abug %]
should be fixed. This field is utilized by the should be fixed compared to other [% terms.bugs %]. This field is utilized
programmers/engineers to prioritize their work to be done. The by the programmers/engineers to prioritize their work to be done.
available priorities range from <b>P1</b> (most important) to
<b>P5</b> (least important).
<h2><a name="bug_severity">Severity</a></h2> <h2><a name="bug_severity">Severity</a></h2>
This field describes the impact of [% terms.abug %]. This field describes the impact of [% terms.abug %].
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment