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

Reports incorrectly filtered if filter changes before search returns #4331

Closed
abbyad opened this issue Mar 26, 2018 · 3 comments
Closed

Reports incorrectly filtered if filter changes before search returns #4331

abbyad opened this issue Mar 26, 2018 · 3 comments
Assignees
Labels
Priority: 2 - Medium Normal priority Type: Bug Fix something that isn't working as intended

Comments

@abbyad
Copy link
Contributor

abbyad commented Mar 26, 2018

If you use the form type filter in the Reports tab the results can include reports that should not be there.

To reproduce:

  • Select an item from the form filter, wait for the results to be updated in the LHS
  • Select a different item from the form filter and deselect the item selected first before the results return
  • See that the reports list includes reports for the selected and un-selected form types:
    image

Tested on beta.dev running 2.15.0-beta.1

@abbyad abbyad added Type: Bug Fix something that isn't working as intended Priority: 2 - Medium Normal priority labels Mar 26, 2018
@abbyad
Copy link
Contributor Author

abbyad commented Sep 13, 2018

Still experiencing this, and it is quite annoying because the search results do not match what you've clicked. It is an easy situation to get into because you can easily select or deselect another item before the search results are returned.

@abbyad abbyad added the Help wanted Good for first time contributions label Sep 13, 2018
@abbyad
Copy link
Contributor Author

abbyad commented Sep 13, 2018

Seen on https://standard.dev.medicmobile.org running 2.18.0-beta.1, and can be seen on any instance with enough data for search results to return slower than you can click another (or same) item.

garethbowen pushed a commit that referenced this issue Sep 20, 2018
Any change to report filters are ignored while reports are being fetched. The function `debounce()` in `services/search.js` is effectively bouncing everything because `_currentQuery.filters` is a reference to `$scope.filters` from `controllers/reports.js`. Fix is to store a copy of the objects instead of a reference.

#4331
@garethbowen garethbowen added Status: 4 - Acceptance testing and removed Help wanted Good for first time contributions labels Sep 20, 2018
@ngaruko
Copy link
Contributor

ngaruko commented Nov 22, 2018

LGTM.
Tested on gamma.de v3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 - Medium Normal priority Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

3 participants