Closed xanhacks closed 3 years ago
Can you provide the full logs? It should contain a log with the actual data being sent to JIRA:
JIRA is very strange in its errors, so your error might mean something else like an invalid project key or using an account with no permissions.
Unfortunately, I don't have any more logs. I also find it strange that this debug line is not displayed.
I really don't see what the problem is with Jira, because I can push findings to Jira but I can't create an Epic.
Looks like the celery work is not on DEBUG log level.
uwsgi:
image: custom/defectdojo-uwsgi:1.14.1
depends_on:
- mysql
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-uwsgi.sh']
environment:
DD_DEBUG: 'True'
DD_LOG_LEVEL: 'DEBUG'
...
DD_CELERY_LOG_LEVEL: 'DEBUG'
There is the env variable for uwsgi.
you need to set it for all containers
I set DD_CELERY_LOG_LEVEL: 'DEBUG'
in every dockers in the docker-compose file but I still don't have the logger.debug('add_epic ...')
line.
You need to set DD_DEBUG and DD_LOG_LEVEL
celeryworker_1 | [21/Apr/2021 07:47:11] DEBUG [dojo.jira_link.helper:974] add_epic:
{'project': {'key': 'SAN'}, 'summary': '[SonarQube] repo', 'description': '[SonarQube] repo', 'issuetype': {'name': 'Epic'}, 'customfield_10102': '[SonarQube] repo'}
Thanks, the line below appears ! The error it's because {'name': 'Epic'}
should be {'name': 'EPIC'}
but I already change it in the code of the uwsgi docker.
$ docker exec -it 37dac944f028 bash
defectdojo@37dac944f028:/app$ cat dojo/jira_link/helper.py | grep "def add_epic(" -A 20
def add_epic(engagement):
logger.debug('trying to create a new jira EPIC for %d:%s', engagement.id, engagement.name)
if not is_jira_configured_and_enabled(engagement):
return False
logger.debug('config found')
jira_project = get_jira_project(engagement)
jira_instance = get_jira_instance(engagement)
if jira_project.enable_engagement_epic_mapping:
issue_dict = {
'project': {
'key': jira_project.project_key
},
'summary': engagement.name,
'description': engagement.name,
'issuetype': {
'name': 'EPIC'
},
get_epic_name_field_name(jira_instance): engagement.name,
Is there any cache or something ? I already purge all the volumes and down/up docker-compose.
You need to rebuild all containers after making code changes. This code is executed in the celery-worker container.
Now it works ! Very big thanks !
DD Version : 1.14.1 Installation : docker-compose
Hello,
Here is the error when I would like to create an epic via DD (my jira instance is already well configured and Enable engagement epic mapping is ON) :
In my Jira configuration, the issue type for an epic is 'EPIC' so I edit the issue_dict and rebuilt the uwsgi docker image, but I still have the same error. (If the issuetype field could go to the settings.dist.py in the future, it will be great)
dojo/jira_link/helper.py
If I test locally this script, it works fine :
Regards