feat: issue drafts (#2161)

This commit is contained in:
Bavisetti Narayan 2023-09-13 12:10:22 +05:30 committed by GitHub
parent 47bec7704b
commit 5a91031243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 198 additions and 0 deletions

View file

@ -0,0 +1,19 @@
# Generated by Django 4.2.3 on 2023-09-12 12:33
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('db', '0042_alter_analyticview_created_by_and_more'),
]
operations = [
migrations.AddField(
model_name='issue',
name='is_draft',
field=models.BooleanField(default=False),
),
]

View file

@ -29,6 +29,7 @@ class IssueManager(models.Manager):
| models.Q(issue_inbox__isnull=True)
)
.exclude(archived_at__isnull=False)
.exclude(is_draft=True)
)
@ -83,6 +84,7 @@ class Issue(ProjectBaseModel):
sort_order = models.FloatField(default=65535)
completed_at = models.DateTimeField(null=True)
archived_at = models.DateField(null=True)
is_draft = models.BooleanField(default=False)
objects = models.Manager()
issue_objects = IssueManager()