Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure main_dttm_col is adhered to for non-drag-and-drop #20712

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Jul 15, 2022

SUMMARY

This PR fixes a regression introduced in #19855 where for non-drag-and-drop the main_dttm_col wasn't being adhered to when creating a new chart.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE

Screen Shot 2022-07-14 at 7 20 53 PM

AFTER

Screen Shot 2022-07-14 at 7 18 18 PM

TESTING INSTRUCTIONS

Tested locally.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@@ -289,14 +289,14 @@ const granularity_sqla: SharedControlConfig<'SelectControl', ColumnMeta> = {
mapStateToProps: state => {
const props: Partial<SelectControlConfig<ColumnMeta | QueryColumn>> = {};
const { datasource } = state;
if (datasource?.columns[0]?.hasOwnProperty('main_dttm_col')) {
if (datasource?.hasOwnProperty('main_dttm_col')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main_dttm_col property exists on the datasource object as opposed the associated columns.

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #20712 (178ceb7) into master (5beb1aa) will not change coverage.
The diff coverage is 0.00%.

❗ Current head 178ceb7 differs from pull request most recent head 66b6019. Consider uploading reports for the commit 66b6019 to get more accurate results

@@           Coverage Diff           @@
##           master   #20712   +/-   ##
=======================================
  Coverage   66.83%   66.83%           
=======================================
  Files        1750     1750           
  Lines       65894    65894           
  Branches     7017     7017           
=======================================
  Hits        44041    44041           
  Misses      20067    20067           
  Partials     1786     1786           
Flag Coverage Δ
javascript 51.94% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...et-ui-chart-controls/src/shared-controls/index.tsx 51.26% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5beb1aa...66b6019. Read the comment docs.

@john-bodley john-bodley changed the title fix: Address main_dttm_col regression introduced #19855 fix: Regression in main_dttm_col #19855 Jul 15, 2022
@john-bodley john-bodley changed the title fix: Regression in main_dttm_col #19855 fix: Ensure main_dttm_col is adhered to for non-drag-and-drop Jul 15, 2022
@john-bodley john-bodley requested review from eschutho and hughhhh July 15, 2022 03:26
@john-bodley john-bodley merged commit a6abcd9 into apache:master Jul 15, 2022
@john-bodley john-bodley deleted the john-bodley--fix-19855 branch July 15, 2022 06:51
john-bodley added a commit to airbnb/superset-fork that referenced this pull request Jul 15, 2022
Co-authored-by: John Bodley <john.bodley@airbnb.com>
(cherry picked from commit a6abcd9)
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants