feat(project_management): Add field is_deleted to projects
preparation for the purge permission. ref: #301 closes #293
This commit is contained in:
@ -67,6 +67,7 @@ class ProjectSerializer(
|
||||
'modified',
|
||||
'external_ref',
|
||||
'external_system',
|
||||
'is_deleted',
|
||||
'url',
|
||||
]
|
||||
|
||||
|
17
app/core/migrations/0010_alter_ticketcategory_options.py
Normal file
17
app/core/migrations/0010_alter_ticketcategory_options.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-18 02:49
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0009_alter_ticket_external_system_alter_ticket_impact_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='ticketcategory',
|
||||
options={'ordering': ['parent__name', 'name'], 'verbose_name': 'Ticket Category', 'verbose_name_plural': 'Ticket Categories'},
|
||||
),
|
||||
]
|
18
app/project_management/migrations/0010_project_is_deleted.py
Normal file
18
app/project_management/migrations/0010_project_is_deleted.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-18 02:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('project_management', '0009_alter_project_state'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='is_deleted',
|
||||
field=models.BooleanField(default=False, help_text='Is this project_considered deleted', verbose_name='Deleted'),
|
||||
),
|
||||
]
|
@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-18 02:59
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('project_management', '0010_project_is_deleted'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='project',
|
||||
name='is_deleted',
|
||||
field=models.BooleanField(default=False, help_text='Is this project considered deleted', verbose_name='Deleted'),
|
||||
),
|
||||
]
|
@ -169,6 +169,14 @@ class Project(ProjectCommonFieldsName):
|
||||
blank = True,
|
||||
)
|
||||
|
||||
is_deleted = models.BooleanField(
|
||||
blank = False,
|
||||
default = False,
|
||||
help_text = 'Is this project considered deleted',
|
||||
null = False,
|
||||
verbose_name = 'Deleted',
|
||||
)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
|
||||
|
Reference in New Issue
Block a user