State of Mattermost checkbox defaults to enabled on error when creating a group

Summary

When creating a group, the state of the Mattermost checkbox (“Create a Mattermost team for this group”) always defaults to enabled (checked) when an error occurs creating the group. If the checkbox is unchecked, and an error occurs creating the group (e.g., using an invalid character in the group name), the page is returned with an error message, but with the checkbox checked.

Steps to reproduce

  1. Create a new group.
  2. Fill in the input fields, an intentionally make an error. For example, use a comma (,) in the group name.
  3. Uncheck the option for creating a Mattermost team.
  4. Click the Create group button.

Example Project

N/A

What is the current bug behavior?

When the new group page returns with the error message, the Mattermost checkbox is enabled.

What is the expected correct behavior?

The Mattermost checkbox should maintain the previously selected state (disabled).

Relevant logs and/or screenshots

Screen_Shot_2018-08-27_at_9.14.18_AM

Output of checks

N/A

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:		
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.4.4p296
Gem Version:	2.7.6
Bundler Version:1.16.2
Rake Version:	12.3.1
Redis Version:	3.2.11
Git Version:	2.18.0
Sidekiq Version:5.1.3
Go Version:	unknown

GitLab information Version: 11.2.0-ee Revision: 8b710b1 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlab.transzap.com HTTP Clone URL: https://gitlab.transzap.com/some-group/some-project.git SSH Clone URL: ssh://git@gitlab.transzap.com:2222/some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 8.1.1 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab Shell ...

GitLab Shell version >= 8.1.1 ? ... OK (8.1.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/2 ... repository is empty 5/5 ... ok 16/6 ... ok 16/9 ... ok 16/10 ... ok 5/16 ... ok 5/17 ... ok 20/20 ... ok 20/21 ... ok 21/22 ... ok 21/23 ... ok 5/24 ... ok 24/25 ... ok 24/26 ... ok 24/28 ... ok 20/29 ... ok 16/30 ... ok 27/31 ... ok 27/32 ... repository is empty 28/33 ... ok 28/35 ... ok 21/36 ... ok 21/37 ... repository is empty 3/38 ... ok 28/39 ... ok 56/40 ... ok 35/41 ... ok 16/42 ... ok 46/45 ... ok 16/46 ... ok 3/47 ... ok 38/48 ... ok 38/50 ... ok 20/51 ... ok 53/52 ... ok 53/53 ... repository is empty 53/54 ... repository is empty 53/55 ... ok 53/56 ... repository is empty 39/57 ... ok 38/58 ... ok 26/59 ... ok 20/60 ... ok 16/61 ... ok 3/62 ... ok 23/63 ... ok 23/64 ... ok 53/65 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) (hidden)

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/2 ... yes 5/5 ... yes 16/6 ... yes 16/9 ... yes 16/10 ... yes 5/16 ... yes 5/17 ... yes 20/20 ... yes 20/21 ... yes 21/22 ... yes 21/23 ... yes 5/24 ... yes 24/25 ... yes 24/26 ... yes 24/28 ... yes 20/29 ... yes 16/30 ... yes 27/31 ... yes 27/32 ... yes 28/33 ... yes 28/35 ... yes 21/36 ... yes 21/37 ... yes 3/38 ... yes 28/39 ... yes 56/40 ... yes 35/41 ... yes 16/42 ... yes 46/45 ... yes 16/46 ... yes 3/47 ... yes 38/48 ... yes 38/50 ... yes 20/51 ... yes 53/52 ... yes 53/53 ... yes 53/54 ... yes 53/55 ... yes 53/56 ... yes 39/57 ... yes 38/58 ... yes 26/59 ... yes 20/60 ... yes 16/61 ... yes 3/62 ... yes 23/63 ... yes 23/64 ... yes 53/65 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.18.0) Git user has default SSH configuration? ... yes Active users: ... 38 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading