Adding custom cycle analytics stage reorders default stages
Summary
Before a custom cycle analytics stage is created, the stage table displays the list of default stages in alphabetical order.
Default stages do not have an id
field for ordering.
After creating a custom stage, default stages appear in the correct order (Issue, Plan, Code, Test, Review, Staging, Production).
Steps to reproduce
- Enable
:analytics
- Enable
:customizable_cycle_analytics
- View a group that has no custom stages
- Create a custom stage
- View the same group
Example Project
This happens locally
What is the current bug behavior?
Default stages are in the wrong order when there are no custom stages
What is the expected correct behavior?
Default stages should be ordered the same way before and after a custom stage is created
Relevant logs and/or screenshots
No custom stages | With custom stages |
---|---|
Output of checks
(If you are reporting a bug on GitLab.com, write: 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
(If you can, link to the line of code that might be responsible for the problem)