Skip to content

Commit eade9c5

Browse files
Raxel Gutierrezdaxtens
authored andcommitted
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 <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>
1 parent 4a7c3f1 commit eade9c5

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 3.1.12 on 2021-08-17 01:36
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('patchwork', '0044_add_project_linkname_validation'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='covercomment',
15+
name='addressed',
16+
field=models.BooleanField(default=False),
17+
),
18+
migrations.AddField(
19+
model_name='patchcomment',
20+
name='addressed',
21+
field=models.BooleanField(default=False),
22+
),
23+
]

patchwork/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ class CoverComment(EmailMixin, models.Model):
657657
related_query_name='comment',
658658
on_delete=models.CASCADE,
659659
)
660+
addressed = models.BooleanField(default=False)
660661

661662
@property
662663
def list_archive_url(self):
@@ -693,6 +694,7 @@ class PatchComment(EmailMixin, models.Model):
693694
related_query_name='comment',
694695
on_delete=models.CASCADE,
695696
)
697+
addressed = models.BooleanField(default=False)
696698

697699
@property
698700
def list_archive_url(self):

0 commit comments

Comments
 (0)