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

Filtering service points issue fixed #3485

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

Aleem92
Copy link
Contributor

@Aleem92 Aleem92 commented Sep 10, 2024

IMPORTANT: Where possible all PRs must be linked to a Github issue

While filtering the register, if some filters are not selected but are mentioned in the dataQueries of nestedSearchResources, the non-selected filters are still included in the filtering query.

Fixes https://github.com/onaio/fhir-resources/pull/3459

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

@Aleem92 Aleem92 self-assigned this Sep 10, 2024
@Aleem92 Aleem92 added the EUSM label Sep 10, 2024
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 27.1%. Comparing base (115c4f4) to head (a79d054).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...er/fhircore/quest/ui/register/RegisterViewModel.kt 0.0% 15 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #3485     +/-   ##
=========================================
- Coverage     27.2%   27.1%   -0.1%     
- Complexity     742     745      +3     
=========================================
  Files          276     275      -1     
  Lines        13811   13926    +115     
  Branches      2504    2531     +27     
=========================================
+ Hits          3764    3782     +18     
- Misses        9540    9620     +80     
- Partials       507     524     +17     
Flag Coverage Δ
engine 64.3% <ø> (-0.4%) ⬇️
geowidget 12.5% <ø> (+1.1%) ⬆️
quest 5.5% <0.0%> (-0.1%) ⬇️

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

Files with missing lines Coverage Δ
...er/fhircore/quest/ui/register/RegisterViewModel.kt 0.0% <0.0%> (ø)

... and 7 files with indirect coverage changes

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Sep 10, 2024

@Aleem92 I tested this and it seems to work well when you select the visit status alone.

  • If you select the flag alone even with the fix that you and @hamza-vd made it doesn't seem to work well.
  • The forms reset every time you open it.

cc: @ellykits

@ellykits
Copy link
Collaborator

The reset was intentional @dubdabasoduba . Every time the questionnaire is launched, the previous filters are reset.

@dubdabasoduba
Copy link
Member

The reset was intentional @dubdabasoduba . Every time the questionnaire is launched, the previous filters are reset.

Why did we do it that way when we have the clear all function?

@Aleem92
Copy link
Contributor Author

Aleem92 commented Sep 11, 2024

@Aleem92 I tested this and it seems to work well when you select the visit status alone.

  • If you select the flag alone even with the fix that you and @hamza-vd made it doesn't seem to work well.
  • The forms reset every time you open it.

cc: @ellykits

@dubdabasoduba

I have tested it by selecting only the flag filter, and it is working fine for me. Can you please share the steps to reproduce the issue? Perhaps I missed something during my testing.

As for the second point, it’s an existing issue and can be seen in the app using the main branch. Let me know if I should look into that as well!

Video.mov

@dubdabasoduba
Copy link
Member

@Aleem92 I have retested thing with the latest main on fhir-resources and it seems to work well

@dubdabasoduba dubdabasoduba added this pull request to the merge queue Sep 12, 2024
@dubdabasoduba dubdabasoduba removed this pull request from the merge queue due to a manual request Sep 12, 2024
@dubdabasoduba dubdabasoduba merged commit 4d5248e into main Sep 12, 2024
4 of 5 checks passed
@dubdabasoduba dubdabasoduba deleted the Fix/filtering-service-points-issue branch September 12, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants