Keep instrumentation key pointer update
What does this MR do and why?
Recently we made a change that when updating product analytics settings, we clear product_analytics_instrumentation_key
. This was implemented in order to allow re-installing product analytics in the project level.
This change introduced a bug that now when we set up Custom dashboard projects
, the existing product_analytics_instrumentation_key
is being removed. (I.e. when setting up custom dashboards.
This MR fixes the bug by cleaning up the product_analytics_instrumentation_key
only when project_setting_attributes
are modified in the analytics controller.
How to set up and validate locally
- Set up a product analytics and complete onboarding
- Check that project has instrumentation key
Project.find(id).project_setting.product_analytics_instrumentation_key
- Go to Settings -> Analytics -> Custom dashboard projects and choose a project under "Analytics Dashboards ".
- Click save changes
- Check that project still has instrumentation key
Project.find(id).project_setting.product_analytics_instrumentation_key
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #427432 (closed)
Edited by Halil Coban