-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(dashboard): make to filter the correct certified or non-certified… #19429
fix(dashboard): make to filter the correct certified or non-certified… #19429
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19429 +/- ##
=======================================
Coverage 66.51% 66.51%
=======================================
Files 1686 1686
Lines 64589 64589
Branches 6635 6635
=======================================
Hits 42959 42959
Misses 19931 19931
Partials 1699 1699
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@rusackas |
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.
LGTM!
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.
Added a couple of click-to-commit suggestions that should fix the Python linting issues blocking this PR.
46d1a52
to
fe92e32
Compare
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.
Thanks for fixing this issue. For the short term, the fix is good. for the long term, I suggest adding todo
notation in the codebase. We might set the certified_by
to NULL
in the Dashboard model when the user deactivates certified so that only keep is null
in where clause.
@prosdev0107 do you want to add that TODO as suggested? |
@rusackas @zhaoyongjie I just added one more condition into where clause for filtering dashboards correctly that was saved before that is keeping only null value when user deactivates certified. Anyway, I can add TODO as suggested for any unexpected case. |
apache#19429) * fix(dashboard): make to filter the correct certified or non-certified dashboards * fix(dashboard): make to fix python lint issue
apache#19429) * fix(dashboard): make to filter the correct certified or non-certified dashboards * fix(dashboard): make to fix python lint issue
SUMMARY
Non certified dashboards appear on dashboard list when filtering by certified
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:
In case of certified filter is Yes
In case of certified filter is No
AFTER:
In case of certified filter is Yes
In case of certified filter is No
TESTING INSTRUCTIONS
How to reproduce the bug
Generally, You will not reproduce this issue anymore with dashboard CRUD. This issue is happened when the certified_by field value is empty string, not null value.(like following image). and so I had a test after changing this forcely into empty string in some dashboards value and then could catch this issue and fix it.
Or you can see this issue on the following workspace;
https://8bf970d2.us1a.app.preset.io/dashboard/list/?filters=(certified:(label:Yes,value:!t))&pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc&viewMode=table
ADDITIONAL INFORMATION