From 70923106958432097b206ca10489dfedb02e63fd Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Mon, 6 May 2024 15:31:30 +0200 Subject: [PATCH] Abuse Reports: Update statuses The previous status choices were: * Untriaged * Valid * Suspicious There was no way to mark a report as "resolved". Besides, marking something as "suspicious" doesn't sound too nice for the reporter. --- .../0007_alter_abusereport_status.py | 18 ++++++++++++++++++ abuse/models.py | 4 ++-- common/templates/common/components/status.html | 6 +++--- 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 abuse/migrations/0007_alter_abusereport_status.py diff --git a/abuse/migrations/0007_alter_abusereport_status.py b/abuse/migrations/0007_alter_abusereport_status.py new file mode 100644 index 00000000..4532f6b0 --- /dev/null +++ b/abuse/migrations/0007_alter_abusereport_status.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-05-06 13:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('abuse', '0006_remove_abusereport_date_deleted'), + ] + + operations = [ + migrations.AlterField( + model_name='abusereport', + name='status', + field=models.PositiveSmallIntegerField(choices=[(1, 'Untriaged'), (2, 'Confirmed'), (3, 'Resolved')], default=1), + ), + ] diff --git a/abuse/models.py b/abuse/models.py index a508e0d9..1ec5113a 100644 --- a/abuse/models.py +++ b/abuse/models.py @@ -29,8 +29,8 @@ class AbuseReport(CreatedModifiedMixin, TrackChangesMixin, models.Model): STATUSES = Choices( ('UNTRIAGED', 1, 'Untriaged'), - ('VALID', 2, 'Valid'), - ('SUSPICIOUS', 3, 'Suspicious'), + ('CONFIRMED', 2, 'Confirmed'), + ('RESOLVED', 3, 'Resolved'), ) # NULL if the reporter is anonymous. diff --git a/common/templates/common/components/status.html b/common/templates/common/components/status.html index cc59facb..d8e10276 100644 --- a/common/templates/common/components/status.html +++ b/common/templates/common/components/status.html @@ -29,17 +29,17 @@ {{ status }} - {% elif 'untriaged' in status.lower %} + {% elif 'confirmed' in status.lower %}
{{ status }}
- {% elif 'suspicious' in status.lower %} + {% elif 'untriaged' in status.lower %}
{{ status }}
- {% elif 'valid' in status.lower %} + {% elif 'resolved' in status.lower %}
{{ status }}
-- 2.30.2