-
Notifications
You must be signed in to change notification settings - Fork 99
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 report result filter determination #2366
Fix report result filter determination #2366
Conversation
Use camelCase for all variables.
Filter model objects are mutable. Therefore a copy must be created to not influence other tests.
The FilterProvider is used to load and determine a filter (mostly) for list pages. In saved the current used filter at a list page in the redux store under the gmp name e.g. task. This change allows to use a different name for the filter saved in the redux store.
The page filter is already passed via redux connect and should be used for loading the report with second highest priority.
When determining the filter for loading a report and its results we need to ensure that the user settings are considered but not to use the stored filter of the results list page. Therefore use a different page name in the FilterProvider to load the report results filter. The resulting filter is passed as defaultFilter to the load function.
Codecov Report
@@ Coverage Diff @@
## gsa-20.08 #2366 +/- ##
=============================================
+ Coverage 52.76% 52.93% +0.17%
=============================================
Files 1070 1070
Lines 25789 25833 +44
Branches 7312 7359 +47
=============================================
+ Hits 13607 13675 +68
+ Misses 11058 11039 -19
+ Partials 1124 1119 -5
Continue to review full report at Codecov.
|
if (!hasValue(filter)) { | ||
// use filter from store | ||
filter = pageFilter; | ||
} |
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.
I am not 100 percent sure if these lines are really necessary because the page filter will be included in the defaultFilter by the FilterProvider already. Currently this overrides a possible ?filter=...
url parameter (named locationQueryFilter in FilterProvider).
Don't use the current stored filter of the results list page for loading results at the report details page.
Checklist: