test connection in "Jira integration" doesnt work

Summary

Test setting in jira integration always says "Connection Successful"

Steps to reproduce

  1. On gitlab.com, navigate to project page
  2. Enable Jira in Settings->Integrations
  3. Give a wrong API key
  4. Click on Test Settings at the bottom
  5. It says connection successful

The same happens when the jira id used does not have access to the project

Example Project

What is the current bug behavior?

Jira "Test Settings" button always says "Connection Successful" even when

  1. API key is wrong
  2. the id does not have access to the jira project

What is the expected correct behavior?

A proper error message saying invalid credentials or does not have access to project respectively

Relevant logs and/or screenshots

image

Output of checks

This bug happens on gitlab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Rajani K