Jira Integration (Test settings & Save) works with invalid credentials

Summary

Background: !131715 (comment 1568419264)

Steps to reproduce

  1. Open the JIRA Integration for a project
    1. Settings -> Integrations -> Jira
  2. Properly fill out the weburl
  3. Add anything for username & password
  4. Click on Test Settings and Save Changes

Example Project

What is the current bug behavior?

  • Clicking on Test Settings -> Everything works, changes ok
  • Clicking on Save Changes -> Changes saved successfully

What is the expected correct behavior?

  • Clicking on Test Settings -> Should fail with credentials error (or whatever Jira returns)
  • Clicking on Save Changes -> Failed to save changes

Relevant logs and/or screenshots

Output of checks

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