Skip to content

Update funnels on custom dashboards project change

What does this MR do and why?

When custom dashboard project is changed by the user, we should update the funnel records in clickhouse by

  • marking the funnels from previous custom project (if any) as deleted
  • marking the funnels from new custom project (if any) as created

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

funnel_custom_pointer_change_mid

How to set up and validate locally

  1. Create a new project and onboard product analytics. Validate the clickhouse database is created.
  2. Create two other projects which has funnel definitions
  3. In the main project, visit project -> settings -> analytics -> Custom dashboard projects and choose one of the projects you have with funnels. Save
  4. Check the database funnel_schemas table. You should see funnels from the custom dashboard repository being created in the clickhouse
  5. Change the custom project to other project. You should see funnels in clickhouse updated
  6. Delete the pointer Analytics::DashboardsPointer.last.destroy!. You should see no more records in clickhouse funnel_schemas

Related to #438947 (closed)

Edited by Halil Coban

Merge request reports