GitLab for Jira Cloud integration sends wrong enviroment name to Jira

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary / Steps

  • Configure GitLab for Jira Cloud integration (with Gitlab 17.11 <> Jira Cloud)

  • Create Gitlab project (this example we are using project johanproject) with .gitlab-ci.yml having deployment job. Example:

deploy:
  stage: deploy
  script:
    - echo "deploy prod"
  environment: production
  • After running deployment, we do see in Gitlab project environments deployment has occurred in production environment:
  • image

What is the current bug behavior?

Now when looking Jira deployments: image

We do see that deployment has occured to johanproject/production environment and not production

From Gitlab logs: "jira_response": { "environment":{\"id\":\"28\",\"displayName\":\"johanproject/production\",\"type\":\"production\"},\"commands\":null}] }

What is the current bug behavior?

Gitlab adds project name as prefix to environment name and this value is assigned to displayName key value which is sent to Jira.

What is the expected correct behavior?

configured environment name in .gitlab-ci.yml must be equal to enviroment displayName key value which is sent to Jira.

deploy:
  stage: deploy
  script:
    - echo "deploy prod"
  environment: production

OK: "jira_response": { "environment":{\"id\":\"28\",\"displayName\":\"production\",\"type\":\"production\"},\"commands\":null}] }

NOT OK: "jira_response": { "environment":{\"id\":\"28\",\"displayName\":\"johanproject/production\",\"type\":\"production\"},\"commands\":null}] }

Edited by 🤖 GitLab Bot 🤖