metabase / metabase/template-clone-prototype

Dashboard tabs are not cloned

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

# Description
We implemented this code to duplicate a Metabase collection and change the data source.
The downloaded data fom Metabase (via API) includes the following structure:
- collections
- collection 1
- collection 2
- collection 3
- cards
- dashboards
- snippets

The code successfully duplicates the following while changing the data source:
* cards
* the dashboard
* the collections

However, it does not duplicate **dashboard tabs**.

# Environment
Metabase Version: v1.50.32
Ruby Version: 3.3.6

# Steps to reproduce
Create a collection in metabase with:
1. A collection that stores queries using field filters
2. A dashboard with tabs and filters

# Expected behavior
After importing the duplicated collection to Metabase, both the original and the duplicated dashboards should contain all tabs, with queries functioning as expected.

# Actual behavior
After importing, the **original** dashboard appears without tabs, and queries fail.

# Problem
We suspect this issue arises because the duplicated dashboards (which have unique IDs) are internally referencing the same tabs, a configuration Metabase may not support.

# Possible solution
The `clone.rb` script does not currently address tabs. Extending it to include tabs might resolve this issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with clone.rb and reproduce the collection import using Metabase v1.50.32, focusing on a dashboard with tabs and filters. Trace the dashboard data handled by the script and compare it with the downloaded Metabase structure. Done means both original and duplicated dashboards retain all tabs and their queries and filters continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.