зеркало из https://github.com/mozilla/treeherder.git
Bug 1582108 - Completely remove confirming state
This commit is contained in:
Родитель
c11699a460
Коммит
084fa55148
|
@ -530,7 +530,7 @@ def test_alert_timestamps_via_endpoint(authorized_sheriff_client, test_sheriff,
|
|||
# keeps first_triaged the same
|
||||
authorized_sheriff_client.force_authenticate(user=test_sheriff)
|
||||
resp = authorized_sheriff_client.put(reverse('performance-alerts-list') + '1/',
|
||||
{'status': PerformanceAlert.CONFIRMING})
|
||||
{'status': PerformanceAlert.ACKNOWLEDGED})
|
||||
assert resp.status_code == 200
|
||||
test_perf_alert.refresh_from_db()
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 2.2.6 on 2019-10-14 14:36
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('perf', '0018_add_measurement_units'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='performancealert',
|
||||
name='status',
|
||||
field=models.IntegerField(
|
||||
choices=[(0, 'Untriaged'), (1, 'Downstream'), (2, 'Reassigned'), (3, 'Invalid'), (4, 'Acknowledged')],
|
||||
default=0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='performancealertsummary',
|
||||
name='status',
|
||||
field=models.IntegerField(choices=[(0, 'Untriaged'), (1, 'Downstream'), (2, 'Reassigned'), (3, 'Invalid'), (4, 'Improvement'), (5, 'Investigating'), (6, "Won't fix"), (7, 'Fixed'), (8, 'Backed out')], default=0),
|
||||
),
|
||||
]
|
|
@ -278,7 +278,6 @@ class PerformanceAlertSummary(models.Model):
|
|||
WONTFIX = 6
|
||||
FIXED = 7
|
||||
BACKED_OUT = 8
|
||||
CONFIRMING = 9
|
||||
|
||||
STATUSES = ((UNTRIAGED, 'Untriaged'),
|
||||
(DOWNSTREAM, 'Downstream'),
|
||||
|
@ -288,8 +287,7 @@ class PerformanceAlertSummary(models.Model):
|
|||
(INVESTIGATING, 'Investigating'),
|
||||
(WONTFIX, 'Won\'t fix'),
|
||||
(FIXED, 'Fixed'),
|
||||
(BACKED_OUT, 'Backed out'),
|
||||
(CONFIRMING, 'Confirming'))
|
||||
(BACKED_OUT, 'Backed out'))
|
||||
|
||||
status = models.IntegerField(choices=STATUSES, default=UNTRIAGED)
|
||||
|
||||
|
@ -330,9 +328,6 @@ class PerformanceAlertSummary(models.Model):
|
|||
if any(alert.status == PerformanceAlert.UNTRIAGED for alert in alerts):
|
||||
return PerformanceAlertSummary.UNTRIAGED
|
||||
|
||||
if any(alert.status == PerformanceAlert.CONFIRMING for alert in alerts):
|
||||
return PerformanceAlertSummary.CONFIRMING
|
||||
|
||||
# if all invalid, then set to invalid
|
||||
if all(alert.status == PerformanceAlert.INVALID for alert in alerts):
|
||||
return PerformanceAlertSummary.INVALID
|
||||
|
@ -417,20 +412,18 @@ class PerformanceAlert(models.Model):
|
|||
REASSIGNED = 2
|
||||
INVALID = 3
|
||||
ACKNOWLEDGED = 4
|
||||
CONFIRMING = 5
|
||||
|
||||
# statuses where we relate this alert to another summary
|
||||
RELATIONAL_STATUS_IDS = (DOWNSTREAM, REASSIGNED)
|
||||
# statuses where this alert is related only to the summary it was
|
||||
# originally assigned to
|
||||
UNRELATIONAL_STATUS_IDS = (UNTRIAGED, INVALID, ACKNOWLEDGED, CONFIRMING)
|
||||
UNRELATIONAL_STATUS_IDS = (UNTRIAGED, INVALID, ACKNOWLEDGED)
|
||||
|
||||
STATUSES = ((UNTRIAGED, 'Untriaged'),
|
||||
(DOWNSTREAM, 'Downstream'),
|
||||
(REASSIGNED, 'Reassigned'),
|
||||
(INVALID, 'Invalid'),
|
||||
(ACKNOWLEDGED, 'Acknowledged'),
|
||||
(CONFIRMING, 'Confirming'))
|
||||
(ACKNOWLEDGED, 'Acknowledged'))
|
||||
|
||||
status = models.IntegerField(choices=STATUSES, default=UNTRIAGED)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче