From eade9c57e2c1a3d864fc0e7d9243d1d663237c32 Mon Sep 17 00:00:00 2001 From: Raxel Gutierrez Date: Fri, 20 Aug 2021 04:50:25 +0000 Subject: [PATCH] models: add addressed field 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 Reviewed-by: Daniel Axtens [dja: give the migration a more meaningful name] Signed-off-by: Daniel Axtens --- patchwork/migrations/0045_addressed_fields.py | 23 +++++++++++++++++++ patchwork/models.py | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 patchwork/migrations/0045_addressed_fields.py diff --git a/patchwork/migrations/0045_addressed_fields.py b/patchwork/migrations/0045_addressed_fields.py new file mode 100644 index 00000000..ed3527bc --- /dev/null +++ b/patchwork/migrations/0045_addressed_fields.py @@ -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), + ), + ] diff --git a/patchwork/models.py b/patchwork/models.py index 00273da9..90e34815 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -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): -- 2.47.3