-
Notifications
You must be signed in to change notification settings - Fork 14k
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(reports): Owners no longer showing undefined in reports #17223
fix(reports): Owners no longer showing undefined in reports #17223
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17223 +/- ##
==========================================
+ Coverage 76.91% 77.01% +0.09%
==========================================
Files 1039 1037 -2
Lines 55566 55636 +70
Branches 7570 7598 +28
==========================================
+ Hits 42740 42848 +108
+ Misses 12576 12538 -38
Partials 250 250
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Talked offline. We shouldn't modify the API to solve this, since it's strictly a frontend problem — the |
FYI, for reference: https://github.com/apache/superset/pull/17167/files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
It would be nice to fix resource
so that it's behaving consistently, but I think this is ok for now.
Agreed, state could use some cleanup here to avoid future complications. |
* Owners no longer showing undefined * Reverted owners change * removed print * Owners now defined - frontend only solution! * Remove arbitrary space
SUMMARY
"undefined undefined" was showing up in the owners list of a report every time it was edited. This was resolved by setting the
owners
data to match the state inalert
(straight from redux state) instead ofresource
(coming from the alert fetch logic). Sinceresource
is manipulated in the update, sometimesowners
will be a list of owner IDs with no other data. This caused the label to return "undefined" forfirst_name
andlast_name
in theowners
object when it's updated.alert
's state, however, consistently has the entireowners
object. It now updates appropriately when updating the owners on a report.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
AFTER
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION