]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
models: add addressed field
authorRaxel Gutierrez <raxel@google.com>
Fri, 20 Aug 2021 04:50:25 +0000 (04:50 +0000)
committerDaniel Axtens <dja@axtens.net>
Mon, 23 Aug 2021 08:54:01 +0000 (18:54 +1000)
Currently, there is no state or status associated with comments. In
particular, knowing whether a comment on a patch or cover letter is
addressed or not is useful for transparency and accountability in the
patch review and contribution process. This patch is backend setup for
tracking the state of patch and cover comments.

Add `addressed` boolean field to patch and cover comments to be able to
distinguish between unaddressed and addressed comments in the
patch-detail page.

Signed-off-by: Raxel Gutierrez <raxel@google.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
[dja: give the migration a more meaningful name]
Signed-off-by: Daniel Axtens <dja@axtens.net>
patchwork/migrations/0045_addressed_fields.py [new file with mode: 0644]
patchwork/models.py

diff --git a/patchwork/migrations/0045_addressed_fields.py b/patchwork/migrations/0045_addressed_fields.py
new file mode 100644 (file)
index 0000000..ed3527b
--- /dev/null
@@ -0,0 +1,23 @@
+# Generated by Django 3.1.12 on 2021-08-17 01:36
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('patchwork', '0044_add_project_linkname_validation'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='covercomment',
+            name='addressed',
+            field=models.BooleanField(default=False),
+        ),
+        migrations.AddField(
+            model_name='patchcomment',
+            name='addressed',
+            field=models.BooleanField(default=False),
+        ),
+    ]
index 00273da9f5bd5dee7f96b1cf88ad7ecf088ef8a7..90e34815e37c9eeb7fc128bfcd8c3cf8d9e44c5e 100644 (file)
@@ -657,6 +657,7 @@ class CoverComment(EmailMixin, models.Model):
         related_query_name='comment',
         on_delete=models.CASCADE,
     )
+    addressed = models.BooleanField(default=False)
 
     @property
     def list_archive_url(self):
@@ -693,6 +694,7 @@ class PatchComment(EmailMixin, models.Model):
         related_query_name='comment',
         on_delete=models.CASCADE,
     )
+    addressed = models.BooleanField(default=False)
 
     @property
     def list_archive_url(self):