Skip to content

Checkbox is disabled when returning to import from external repo

Summary

Mirror repository checkbox can be stuck in a disabled state.

Steps to reproduce

Use Firefox

  1. Create a new project/repository
  2. Choose Import project
  3. Pick Repo by URL
  4. Change the option to a different choice like GitHub
  5. Use the back function in the browser to go back a page
  6. Select Repo by URL again
  7. The mirror repository button will be disabled

Work around. Start the process over and don't navigate away.

Example Project

N/A

What is the current bug behavior?

The checkbox is disabled when it should not be

What is the expected correct behavior?

Don't set the checkbox to disabled

Relevant logs and/or screenshots

Import_bug

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)

Implementation plan

this will require GitLab license to fix. You can request free trial at https://about.gitlab.com/free-trial/ for working on this issue

Three steps to fix:

  1. Remove disabled by default behavior in /home/xanf/projects/gitlab/gdk/gitlab/ee/app/views/shared/ee/_import_form.html.haml
  2. Remove logic which toggles disabled state in app/assets/javascripts/projects/project_new.js
  3. Update relevant tests
Edited by Illya Klymov