add IssueInfo model (#77825)

This commit is contained in:
Lauréline Guérin 2023-05-23 16:28:52 +02:00
parent 7306558867
commit 762e2ac0d2
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,40 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0005_auto_20201216_1435'),
]
operations = [
migrations.CreateModel(
name='IssueInfo',
fields=[
(
'id',
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
('issue_id', models.IntegerField()),
(
'issue_type',
models.CharField(
choices=[
('NEW', 'NEW (Nouveautés)'),
('BUGFIX', 'BUGFIX (Corrections)'),
('DEV', 'DEV (Développements)'),
('TECH', 'TECH (À ignorer)'),
],
max_length=10,
null=True,
verbose_name='Type de ticket',
),
),
(
'doc_focus',
models.BooleanField(
default=False, verbose_name='Attention à porter à la doc (la mettre à jour ?)'
),
),
],
),
]

View File

@ -205,3 +205,17 @@ class InstalledVersion(models.Model):
).order_by('-timestamp')[0]
except IndexError:
return None
ISSUE_TYPES = [
('NEW', 'NEW (Nouveautés)'),
('BUGFIX', 'BUGFIX (Corrections)'),
('DEV', 'DEV (Développements)'),
('TECH', 'TECH (À ignorer)'),
]
class IssueInfo(models.Model):
issue_id = models.IntegerField()
issue_type = models.CharField('Type de ticket', max_length=10, choices=ISSUE_TYPES, null=True)
doc_focus = models.BooleanField('Attention à porter à la doc (la mettre à jour ?)', default=False)