-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Only last 50 reports for contact are provided to contact-summary calculation #8815
Comments
Reproducing the errorHi @ralfudx I have started working on this issue. First thing I have done is reproduce the error. (I have a test plan at the bottom where I welcome your input / comment)
Video showing created woman has pregnancy card when reports are less than 50Screen.Recording.2024-03-27.at.21.04.44.mov
Video showing pregnancy card for woman does not appear when reports than 50 reports and the pregnancy report is not part of the 50Screen.Recording.2024-03-27.at.21.13.38.mov@jkuester please confirm my understanding and reproducing of the error is correct, when you get a chance. Thank you 😄 Test Plan
Technical solution (Work in Progress) |
👍 your recreation steps are exactly correct! |
@Benmuiruri and @ralfudx you can also consider adding contact-summary fields that calculate based on reports and display them in the UI: This work should not affect tasks, targets, or any element displayed in this view. This work will probably impact performance. We need to measure the before and after:
We have telemetry measuring this, please post a comparison table: when having 50 reports [before, after], when having #### reports [before, after]. @michaelkohn @n-orlowski since we are working to retrieve +50 reports. Is that okay for the contact details view > reports section > |
…8984) * Chore: add search limit * Chore: add filter limit * chore: update factory to create active pregnancy * chore: add test to confirm pregnancy card * chore: add display limit * chore: feedback * chore: make sonar happy * fix: update tests * fix: make sonar really happy * fix: sonar please * chore: feedback * fix: feedback * fix: feedback
The fix for this issue was merged.
|
…8984) * Chore: add search limit * Chore: add filter limit * chore: update factory to create active pregnancy * chore: add test to confirm pregnancy card * chore: add display limit * chore: feedback * chore: make sonar happy * fix: update tests * fix: make sonar really happy * fix: sonar please * chore: feedback * fix: feedback * fix: feedback
Describe the bug
The
contact-summary
calculation logic is provided with an array of the reports associated with the contact (and any of the contact'sperson
children). Unfortunately, because of the way the code was implemented (at least as far back as3.9
) the number of reports that would be retrieved for the contact and passed to thecontact-summary
calculation was capped at 50. So, thecontact-summary
for contacts associated with >50 reports, would not have the full context of all that contacts reports.To Reproduce
Expected behavior
The
search.service
gets used in a number of situations where it probably makes sense to have the 50 report limit (e.g. when displaying reports for the contact on the contact's profile page, we probably do not need to show an unlimited number of reports). However, for thecontact-summary
calculation, for the sake of accuracy, we should be providing all the reports associated with that contact.Also, the contact-summary docs should be updated to note which version lifted the 50 report limit.
Additional context
https://github.com/medic/config-muso/issues/1050
Forum thread
Fixed 6-April-2024
The fix for this issue was merged.
The text was updated successfully, but these errors were encountered: