зеркало из https://github.com/mozilla/bugbot.git
[severity_inconsistency] Drop the dependency on the whiteboard tags (#2078)
This commit is contained in:
Родитель
e1332ae093
Коммит
0ce9ee2d40
|
@ -2,13 +2,9 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import re
|
||||
|
||||
from bugbot import utils
|
||||
from bugbot.bzcleaner import BzCleaner
|
||||
|
||||
WHITEBOARD_PAT = re.compile(r"\[access\-s[123]\]")
|
||||
|
||||
|
||||
class SeverityInconsistency(BzCleaner):
|
||||
def description(self):
|
||||
|
@ -18,13 +14,9 @@ class SeverityInconsistency(BzCleaner):
|
|||
return True
|
||||
|
||||
def handle_bug(self, bug, data):
|
||||
whiteboard_severities = WHITEBOARD_PAT.findall(bug["whiteboard"])
|
||||
assert len(whiteboard_severities) == 1
|
||||
whiteboard_severity = whiteboard_severities[0]
|
||||
|
||||
bugid = str(bug["id"])
|
||||
data[bugid] = {
|
||||
"whiteboard_severity": whiteboard_severity,
|
||||
"accessibility_severity": bug["cf_accessibility_severity"],
|
||||
"severity": bug["severity"],
|
||||
}
|
||||
self.extra_ni = data
|
||||
|
@ -35,7 +27,7 @@ class SeverityInconsistency(BzCleaner):
|
|||
return self.extra_ni
|
||||
|
||||
def columns(self):
|
||||
return ["id", "summary", "severity", "whiteboard_severity"]
|
||||
return ["id", "summary", "severity", "accessibility_severity"]
|
||||
|
||||
def get_mail_to_auto_ni(self, bug):
|
||||
for field in ["assigned_to", "triage_owner"]:
|
||||
|
@ -46,7 +38,12 @@ class SeverityInconsistency(BzCleaner):
|
|||
return None
|
||||
|
||||
def get_bz_params(self, date):
|
||||
fields = ["triage_owner", "assigned_to", "severity", "whiteboard"]
|
||||
fields = [
|
||||
"triage_owner",
|
||||
"assigned_to",
|
||||
"severity",
|
||||
"cf_accessibility_severity",
|
||||
]
|
||||
|
||||
params = {
|
||||
"include_fields": fields,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<p>
|
||||
The following {{ plural('bug has', data, pword='bugs have') }} inconsistency between the bug severity and Whiteboard severity flag. {{ plural('Owner', data) }} got {{ plural('a needinfo request', data, pword='needinfo requests') }} to bump the severity:
|
||||
The following {{ plural('bug has', data, pword='bugs have') }} inconsistency between the bug severity and accessibility severity flag. {{ plural('Owner', data) }} got {{ plural('a needinfo request', data, pword='needinfo requests') }} to bump the severity:
|
||||
</p>
|
||||
<table {{ table_attrs }}>
|
||||
<thead>
|
||||
|
@ -7,11 +7,11 @@
|
|||
<th>Bug</th>
|
||||
<th>Summary</th>
|
||||
<th>Severity</th>
|
||||
<th>Whiteboard Flag</th>
|
||||
<th>Accessibility Severity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i, (bugid, summary, severity, whiteboard_severity) in enumerate(data) -%}
|
||||
{% for i, (bugid, summary, severity, accessibility_severity) in enumerate(data) -%}
|
||||
<tr {% if i % 2 == 0 %}bgcolor="#E0E0E0"
|
||||
{% endif -%}
|
||||
>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</td>
|
||||
<td>{{ summary | e }}</td>
|
||||
<td>{{ severity }}</td>
|
||||
<td>{{ whiteboard_severity }}</td>
|
||||
<td>{{ accessibility_severity }}</td>
|
||||
</tr>
|
||||
{% endfor -%}
|
||||
</tbody>
|
||||
|
|
Загрузка…
Ссылка в новой задаче