metabase / metabase

The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum:
https://metabase.com
Other
38.14k stars 5.05k forks source link

Linking a dashboard filter to multiple dashboard tiles, and viewing as a grouped user causes entity keys to appear in the dropdown filter in place of entity names. #47951

Open JamesPoel opened 3 days ago

JamesPoel commented 3 days ago

Describe the bug

When viewing a dashboard with a filter that is linked to multiple questions as a users with grouped permission access, the filters display entity keys rather than entity names.

To Reproduce

  1. Create a new permission group and give it "Can view" access to the "Accounts", "Feedback" and "Invoices" sample database tables.

Screenshot 2024-09-16 134807

  1. Verify that the "Account ID" fields within the "Feedback" and "Invoices" tables are linked to "Accounts -> ID", that "filtering on this field" is set to "a list of all values" and that the display value is set to "Use foreign key-> First Name"

Screenshot 2024-09-16 134859

  1. Create a new user and assign it to the group created in step 1 (don't log into it yet).

Screenshot 2024-09-16 135344

  1. Create a new collection (and allow the user created in step 3 "View" access), and create two simple GUI questions against the Feedback and Invoices tables.
image
  1. Create a new dashboard, and add The Feedback and Invoices questions created in step 4. Add a new "ID" filter and link it to the "Invoices.Account ID" field.

Screenshot 2024-09-16 135144

  1. Log into the account you created in step 3, and verify that the filter correctly loads the first names.

Screenshot 2024-09-16 135213

  1. Log back into the admin account, unlink the "ID" filter from the Invoices question, and link it to the "Feedback.Account ID" field.

Screenshot 2024-09-16 135233

  1. Log back into the account you created in step 3, and verify that the filter still correctly loads the first names.

Screenshot 2024-09-16 135243

  1. At this point, we have verified that the filter works correctly when assigned to either the Invoices or Feedback questions. But, now log back into the admin account, and assign the "ID" filter to both the "Invoices.Account ID" and Feedback.Account ID" fields together.

Screenshot 2024-09-16 135251

  1. Log back into the account you created in step 3, and you will now find that the filter displays a list of entity keys rather than entity names.

Screenshot 2024-09-16 135310

Expected behavior

When a filter is linked to multiple fields on multiple tiles, the entity names should still display in the filter dropdown when viewed as a user with grouped permission access.

Logs

No response

Information about your Metabase installation

{
  "browser-info": {
    "language": "en-GB",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "metabase-info": {
    "databases": [
      "h2",
      "mysql"
    ],
    "run-mode": "prod",
    "plan-alias": "pro-self-hosted",
    "version": {
      "date": "2024-09-10",
      "tag": "v1.50.25",
      "hash": "473a7ca"
    },
    "settings": {
      "report-timezone": "Europe/London"
    },
    "hosting-env": "unknown",
    "application-database": "mysql",
    "application-database-details": {
      "database": {
        "name": "MySQL",
        "version": "8.0.39-0ubuntu0.22.04.1"
      },
      "jdbc-driver": {
        "name": "MariaDB Connector/J",
        "version": "2.7.10"
      }
    }
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.24+8",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.24",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.24+8",
    "os.name": "Linux",
    "os.version": "6.5.0-1023-aws",
    "user.language": "en",
    "user.timezone": "GMT"
  }
}

Severity

High

Additional context

No response

paoliniluis commented 3 days ago

@JamesPoel if you're a paid customer, please write to our support email