ID Filters using labels not working properly (Possible bug)?

I think this looks like a bug to me. But I wanted to post here first to see if I'm missing a step somewhere.

I'm trying to display a chart using two tables:


The temp log table has 3 columns. timestamp, device_id, and value (temperature). Basically this table just logs the temperature values it receives from various devices over time.

The device labels (IE: The names of said devices) are stored in the house_device_labels table. This is where an ID value of say '1507' is mapped to something readable and understandable by a user like "Attic Water Heater Top Tank Temperature"

Here's what my data model for these two tables looks like:

I created a "Question" that charts these device values with a line for each device over time. I added this chart to a dashboard and added an "ID FIlter" on house_temp_log.device since this is the field I want filtered in the underlying database. And since my data model links this field to the label in house_device_labels.label the filter very nicely displays the device names for the user rather than displaying the raw device ID. So far Metabase is working exactly as I would expect it to:

Here's my filter:

And here's what it displays on the dashboard when you go to select devices to filter on:

Again: This is exactly what I'm expecting so far. I want to filter on the device ID but I want the user to be able to select the user friendly label from the filter UI.

However when I actually try to select one of those devices and then select "Add filter", I get this:

When I check the log file I see this in the stack trace:

 [{:type java.text.ParseException,
   :message "Unparseable number: \"Attic Water Heater Bottom Temperature\"",
   :at [java.text.NumberFormat parse "" 385]}],
 [[java.text.NumberFormat parse "" 385]

So it looks like the filter UI is trying to be user friendly by displaying the "Label" value, but when you select one of those values it tries to filter on the actual label text, rather than mapping it back to the device_id.

Here is my version/build info:

2022-01-05 15:29:52,620 INFO metabase.core :: Starting Metabase in STANDALONE mode
2022-01-05 15:29:52,666 INFO metabase.server :: Launching Embedded Jetty Webserver with config:
 {:port 3000}

2022-01-05 15:29:52,705 INFO metabase.core :: Starting Metabase version v0.41.5 (fbfffc6 release-x.41.x) ...
2022-01-05 15:29:52,747 INFO metabase.core :: System info:
 {"file.encoding" "UTF-8",
 "" "OpenJDK Runtime Environment",
 "java.runtime.version" "1.8.0_312-8u312-b07-0ubuntu1~16.04-b07",
 "java.vendor" "Private Build",
 "java.vendor.url" "",
 "java.version" "1.8.0_312",
 "" "OpenJDK 64-Bit Server VM",
 "java.vm.version" "25.312-b07",
 "" "Linux",
 "os.version" "4.4.0-217-generic",
 "user.language" "en",
 "user.timezone" "America/Chicago"}

Hi @irwinr
You're seeing this issue: - upvote by clicking :+1: on the first post
In the future, you can find full "Diagnostic Info" in Admin > Troubleshooting, and the full stacktrace is needed.

Thanks. I upvoted the bug on GitHub.

It seems this has been a known regression (Priority P2) since Sept 2020, so nearly 1.5 years?

I would think having display names in a separate table linked via foreign key would be a fairly common occurrence in data sets. I'm a little surprised to see something that seems like a commonly used and fairly standard visualization feature would be broken for so long.

@irwinr There are 600+ other bugs and not until recently have we had the manpower to churn down bugs.