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