Skip to content

Commit

Permalink
jira issue type migration quickfix (DefectDojo#11831)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
valentijnscholten authored and quirinziessler committed Feb 26, 2025
1 parent c96589f commit 69742ac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker-compose.override.unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
DD_CELERY_BROKER_PORT: "-1"
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
DD_CELERY_BROKER_PARAMS: ''
DD_JIRA_EXTRA_ISSUE_TYPES: 'Vulnerability' # Shouldn't trigger a migration error
celerybeat:
image: busybox:1.37.0-musl
entrypoint: ['echo', 'skipping', 'celery beat']
Expand Down
1 change: 1 addition & 0 deletions docker-compose.override.unit_tests_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
DD_CELERY_BROKER_PORT: "-1"
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
DD_CELERY_BROKER_PARAMS: ''
DD_JIRA_EXTRA_ISSUE_TYPES: 'Vulnerability' # Shouldn't trigger a migration error
celerybeat:
image: busybox:1.37.0-musl
entrypoint: ['echo', 'skipping', 'celery beat']
Expand Down
3 changes: 2 additions & 1 deletion dojo/db_migrations/0027_jira_issue_type_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by Django 2.2.4 on 2020-01-02 15:33

from django.conf import settings
from django.db import migrations, models


Expand All @@ -13,6 +14,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='jira_conf',
name='default_issue_type',
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),
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),
),
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by Django 4.1.7 on 2023-03-06 11:38

from django.conf import settings
from django.db import migrations, models


Expand All @@ -13,6 +14,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='jira_instance',
name='default_issue_type',
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),
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),
),
]

0 comments on commit 69742ac

Please sign in to comment.