Skip to content

Commit b41e14c

Browse files
jira issue type migration quickfix (#11831)
* jira issue type migration quickfix * jira issue type migration quickfix: add env variable to unit test * jira issue type migration quickfix: add env variable to unit test
1 parent 82f4077 commit b41e14c

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

docker-compose.override.unit_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ services:
2929
DD_CELERY_BROKER_PORT: "-1"
3030
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
3131
DD_CELERY_BROKER_PARAMS: ''
32+
DD_JIRA_EXTRA_ISSUE_TYPES: 'Vulnerability' # Shouldn't trigger a migration error
3233
celerybeat:
3334
image: busybox:1.37.0-musl
3435
entrypoint: ['echo', 'skipping', 'celery beat']

docker-compose.override.unit_tests_cicd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ services:
2828
DD_CELERY_BROKER_PORT: "-1"
2929
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
3030
DD_CELERY_BROKER_PARAMS: ''
31+
DD_JIRA_EXTRA_ISSUE_TYPES: 'Vulnerability' # Shouldn't trigger a migration error
3132
celerybeat:
3233
image: busybox:1.37.0-musl
3334
entrypoint: ['echo', 'skipping', 'celery beat']

dojo/db_migrations/0027_jira_issue_type_settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated by Django 2.2.4 on 2020-01-02 15:33
22

3+
from django.conf import settings
34
from django.db import migrations, models
45

56

@@ -13,6 +14,6 @@ class Migration(migrations.Migration):
1314
migrations.AlterField(
1415
model_name='jira_conf',
1516
name='default_issue_type',
16-
field=models.CharField(choices=[('Task', 'Task'), ('Story', 'Story'), ('Epic', 'Epic'), ('Spike', 'Spike'), ('Bug', 'Bug'), ('Security', 'Security')], default='Bug', help_text='You can define extra issue types in settings.py', max_length=15),
17+
field=models.CharField(choices=settings.JIRA_ISSUE_TYPE_CHOICES_CONFIG, default='Bug', help_text='You can define extra issue types in settings.py', max_length=15),
1718
),
1819
]

dojo/db_migrations/0182_alter_jira_instance_default_issue_type.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated by Django 4.1.7 on 2023-03-06 11:38
22

3+
from django.conf import settings
34
from django.db import migrations, models
45

56

@@ -13,6 +14,6 @@ class Migration(migrations.Migration):
1314
migrations.AlterField(
1415
model_name='jira_instance',
1516
name='default_issue_type',
16-
field=models.CharField(choices=[('Task', 'Task'), ('Story', 'Story'), ('Epic', 'Epic'), ('Spike', 'Spike'), ('Bug', 'Bug'), ('Security', 'Security')], default='Bug', help_text='You can define extra issue types in settings.py', max_length=255),
17+
field=models.CharField(choices=settings.JIRA_ISSUE_TYPE_CHOICES_CONFIG, default='Bug', help_text='You can define extra issue types in settings.py', max_length=255),
1718
),
1819
]

0 commit comments

Comments
 (0)