Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
"Custom Mapping" Display Value option is not available on tables with NULL entries #8116
Expected behaviour: Custom value mappings should be available for all columns
When choosing display values for Enum members, the "Custom Values" option only appears if there are no
Steps to reproduce:
I'm not overly familiar with the codebase, nor React, but this appears to be the line in question.
We are implementing Metabase on a big database with a lot of historical data. Some of the fields did not exist previously so there are empty.
Due to the issue explained in this ticket, we are not able to use Custom Value Mapping in a lot of our columns. The work around appears to be to review the past data to eliminate any remaining null value but we would prefer to avoid changing any historical data.
Can we expect that this may be fixed in a future release? Is there any work around that would allow us to use custom mapping without having to change the data?
So I have made a very simple test. Here's a table I've created on MS SQL Express:
As you can see, I am using two int columns for type and subtype. Column subtype will have a single entry which is NULL.
As you can see, although both columns types are the same (int), since the column subtype has a NULL value, the Custom Mapping feature is not shown for that column.
This is a test I did: As soon as I update that NULL value as an int, the Custom Mapping option becomes available.
In my humble opinion, it would be interesting to allow custom mapping when the column contains NULL values. One could specify the Custom Mapping to apply to the NULL value itself.
Some final info:
Let me know if I can help with additional info.