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: sorting on "Modified By" in chart table #16208

Merged
merged 2 commits into from
Aug 11, 2021

Conversation

pkdotson
Copy link
Member

SUMMARY

This pr fixes sorting problem for last_saved_by in the chartlist view. The accessor was set to the wrong key.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before
https://user-images.githubusercontent.com/17326228/129097514-0cdb53d5-27ca-4a86-914e-45cd147d19d3.mov

after

Screen.Recording.2021-08-11.at.1.47.25.PM.mov

TESTING INSTRUCTIONS

Go to the chart listview page and clicked the modified by sorting button to test out proper sorting.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@@ -285,7 +285,7 @@ function ChartList(props: ChartListProps) {
</a>
),
Header: t('Modified by'),
accessor: 'last_saved_by',
accessor: 'last_saved_by.id',
Copy link
Member

Choose a reason for hiding this comment

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

does this result in an alphabetical sort?

Copy link
Member Author

@pkdotson pkdotson Aug 11, 2021

Choose a reason for hiding this comment

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

hmm should probably change this to .lastname then? I only tested with superset admin user

Copy link
Member Author

Choose a reason for hiding this comment

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

i'll do first name since the original logic was to use first name.

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #16208 (9b788dd) into master (ccfc95f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16208   +/-   ##
=======================================
  Coverage   76.73%   76.73%           
=======================================
  Files         996      996           
  Lines       52999    52999           
  Branches     6738     6738           
=======================================
  Hits        40668    40668           
  Misses      12102    12102           
  Partials      229      229           
Flag Coverage Δ
javascript 70.97% <ø> (ø)

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

Impacted Files Coverage Δ
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 72.61% <ø> (ø)

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 ccfc95f...9b788dd. Read the comment docs.

change sort to first name
@rusackas rusackas changed the title fix: sorting modified by in charttable fix: sorting on "Modified By" in chart table Aug 11, 2021
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@rusackas Ephemeral environment spinning up at http://34.220.60.74:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@pkdotson pkdotson merged commit b4555df into apache:master Aug 11, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@rusackas rusackas deleted the fix-accessor-chartlist branch August 12, 2021 16:17
stevenuray pushed a commit to preset-io/superset that referenced this pull request Aug 12, 2021
* initial fix

* Update ChartList.tsx

change sort to first name

(cherry picked from commit b4555df)
@rosemarie-chiu
Copy link
Contributor

🏷 2021.31

@villebro villebro added the v1.3 label Aug 16, 2021
villebro pushed a commit that referenced this pull request Aug 16, 2021
* initial fix

* Update ChartList.tsx

change sort to first name

(cherry picked from commit b4555df)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* initial fix

* Update ChartList.tsx

change sort to first name
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* initial fix

* Update ChartList.tsx

change sort to first name

(cherry picked from commit b4555df)
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* initial fix

* Update ChartList.tsx

change sort to first name
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* initial fix

* Update ChartList.tsx

change sort to first name

(cherry picked from commit b4555df)
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* initial fix

* Update ChartList.tsx

change sort to first name

(cherry picked from commit 9ad119b)
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 preset:2021.31 preset-io size/XS v1.3 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants