[Bug] Editing a new dashboard duplicates it on the Analytics dashboards list and changes made are lost
Summary
Creating and then editing a new dashboard's title
results in the both the old & new title being listed in the Analytics dashboards list.
Then when opening either of the duplicate dashboards shows the original title
at the top of the dashboard.
Also when editing the panels on one of these dashboards the user can save the changes, but opening it back up renders the original state and the changes appear to be lost.
Steps to reproduce
- On a project or instance with shared analytics dashboards enabled & custom dashboards configured.
- View the Project > Analytics > Analytics dashboards page.
- Create a new dashboard named
dashboard-one
. - Go back to the dashboards list.
- Open the dashboard
dashboard-one
and edit its name todashboard-two
. - Go back to the dashboards list.
- Observe that both
dashboard-one
anddashboard-two
are listed. - Open both dashboards and observe that both have the title
dashboard-one
when you'd expectdashboard-two
. - Go back to the dashboards list.
- Open
dashboard-one
and add some visualizations and clicksave
. - Go back to the dashboards list and open
dashboard-one
again. - Observe that the changes made have been lost.
Example Project
What is the current bug behavior?
Duplicate dashboard list entries are generated.
The changes to the dashboard title
don't appear to be saved.
Saved panel changes are lost.
Reloading the page fixes the issue.
What is the expected correct behavior?
The old name is removed from the list of dashboards and only the new name is shown.
Saved panel changes are shown.
Relevant logs and/or screenshots
Screen_Recording_2023-09-15_at_11.35.16
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
TBD