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

Being able to apply all custom filters on Due and Overdue visits cards added to custom dashboard #1382

Closed
Tracked by #912 ...
mahalakshme opened this issue Apr 19, 2024 · 14 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Apr 19, 2024

Need:

  • When specific filters for subject type like mentioned here it needs to work in mobile app
    Example usecase: To support 'Weight for Age grade' in JSSCP that is configured currently in MyDashboard for a specific subject type.
  • When the same filter types(Gender, Registeration Date, Enrolment Date, Encounter Date, Program Encounter Date, Address, Concept, Group Subject) are configured generically without being under 'Subject Type' filter as well it need to work
    Example usecase: To support filtering by a concept present in registeration forms of all subject types
    Image

As is:

Currently only Location filter is supported on Due and Overdue visits card when configured generically(without being based on subject type)

AC:

  • All the above mentioned filters when configured(with or without being specific to subject type) need to work when 'Due/Scheduled visits' and 'Overdue visits' card added to custom dashboard.

Technical details:

  • Made applying of filters with and w/o subject type as part of same card, since its good to have the same code for both cases and the subject type filter will only get applied additionally in the 1st case.
@mahalakshme mahalakshme converted this from a draft issue Apr 19, 2024
@mahalakshme mahalakshme changed the title Being able to apply all custom filters on Due and Overdue visits cards Being able to apply all custom filters on Due and Overdue visits cards added to custom dashboard Apr 19, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Apr 19, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Analysis Complete in Avni Product May 10, 2024
@mahalakshme mahalakshme moved this from Analysis Complete to Ready in Avni Product May 31, 2024
@himeshr himeshr moved this from Ready to In Progress in Avni Product Jun 4, 2024
@himeshr himeshr self-assigned this Jun 4, 2024
@himeshr himeshr moved this from In Progress to Ready in Avni Product Jun 5, 2024
@himeshr himeshr moved this from Ready to In Progress in Avni Product Jun 6, 2024
@himeshr
Copy link
Contributor

himeshr commented Jun 6, 2024

Code review and QA is pending for below specified cards, only after which we should resume further deveopment here as all changes in these cards have been throwing up errors or blocking dev org configuration.

avniproject/avni-webapp#1203
avniproject/avni-webapp#1204
avniproject/avni-webapp#1235
#1381

@himeshr himeshr moved this from In Progress to Hold in Avni Product Jun 6, 2024
@mahalakshme mahalakshme moved this from Hold to Ready in Avni Product Jun 12, 2024
@himeshr himeshr removed their assignment Jun 12, 2024
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Jun 12, 2024
@petmongrels petmongrels self-assigned this Jun 12, 2024
@petmongrels
Copy link
Contributor

petmongrels commented Jun 13, 2024

Card dev notes

  • check if filter cache is working when there are more than one gender filter values (done)
  • removing subject types should remove the program/encounter types as well (done)
  • test with multiple address levels on user's device (done)
  • throw error to check whether cache is getting reset (done)

Design doc topics

  • How checksum is maintained
  • How and why handle errors during filtering
  • Responsibility definition

QA notes

  • Regression required for MyDashboard (especially address levels)
  • Since concept has multiple data types, testing should be done for this card for different data types
  • Please also check whether each type of filters are getting remembered
  • Also check any implementation that have used Custom Report cards based on rules recently, to check if they are working fine too.

petmongrels added a commit that referenced this issue Jun 13, 2024
…en unselected in the filters. fixed BaseService find by all uuid. refactored custom filter service so that it can be reused. removed wrong use of state at the service level for individuals. used CustomFilterService in scheduled report card type.
petmongrels added a commit to avniproject/avni-models that referenced this issue Jun 17, 2024
petmongrels added a commit to avniproject/avni-models that referenced this issue Jun 19, 2024
…ashboaerd cache to have empty objects hash value.
petmongrels added a commit that referenced this issue Jun 19, 2024
…es. Intialise filters with nullobjects when there is no previous value for them.
petmongrels added a commit that referenced this issue Jun 19, 2024
…es specific value types to identify whether value is present or not.

Support date range based on Range value type.
Separate V1 and V2 code in some other places.
from dev settings also clear custom dashboard cache.
hash based on filter configs JSON using jshashes library.
logger to allow multiple arguments like console log. removed unused functional methods from General and move logging related method be internal to General.
petmongrels added a commit to avniproject/avni-models that referenced this issue Jun 20, 2024
…nfig. custom dashboard cache can be instantiated and reset with hash as the filters are known at the time. fixed bugs in MetaDataService.
petmongrels added a commit that referenced this issue Jun 20, 2024
…lay text methods for console logging. v2 function for concept filter query due to difference in data representation.
petmongrels added a commit that referenced this issue Jun 20, 2024
@mahalakshme
Copy link
Contributor Author

mahalakshme commented Jun 21, 2024

@petmongrels getting this error after configuring the below dashboard. Seems to be getting after deleting the dashboard as well

Image

Image

@AchalaBelokar
Copy link

Env: prereleases

  • Login with maha@apfodisha and created a card household with group subject type filter . but filter is not working.
az_recorder_20240829_170046.mp4

@AchalaBelokar AchalaBelokar moved this from In QA to QA Failed in Avni Product Aug 29, 2024
@petmongrels petmongrels moved this from QA Failed to In Progress in Avni Product Aug 30, 2024
@petmongrels
Copy link
Contributor

fixed. the second report card will show the correct numbers now.
FYI - Please note that the first report card will show zero because it is showing number of households which is part of group household. not a valid condition.

@petmongrels petmongrels moved this from In Progress to QA Ready in Avni Product Aug 30, 2024
@AchalaBelokar
Copy link

AchalaBelokar commented Aug 30, 2024

  • I login with maha@apfodisha and go to the household dashboard and added the location filter but it is not showing the value it is giving me error
    Cannot set property 'isSelected' of undefined
    at anonymous (address at index.android.bundle:1:2417179)
    at forEach ((native)::)
    at setSelectedAddresses (address at index.android.bundle:1:2417114)
    at anonymous (address at index.android.bundle:1:4248687)
    at anonymous (address at index.android.bundle:1:1112823)
    at map ((native)::)
    at apply ((native)::)
    at value (address at index.android.bundle:1:2247068)
    at map (address at index.android.bundle:1:1112785)
    at render (address at index.android.bundle:1:4247660)
    at finishClassComponent (address at index.android.bundle:1:367544)
    at updateClassComponent (address at index.android.bundle:1:367405)
    at beginWork$1 (address at index.android.bundle:1:399723)
    at performUnitOfWork (address at index.android.bundle:1:386774)
    at workLoopSync (address at index.android.bundle:1:386676)
    at renderRootSync (address at index.android.bundle:1:386560)
    at performSyncWorkOnRoot (address at index.android.bundle:1:384043)
    at flushSyncCallbacks (address at index.android.bundle:1:349073)
    at batchedUpdatesImpl (address at index.android.bundle:1:400497)
    at batchedUpdates (address at index.android.bundle:1:341930)
    at _receiveRootNodeIDEvent (address at index.android.bundle:1:342203)
    at receiveTouches (address at index.android.bundle:1:395353)
    at apply ((native)::)
    at __callFunction (address at index.android.bundle:1:98035)
    at anonymous (address at index.android.bundle:1:96528)
    at __guard (address at index.android.bundle:1:97468)
    at callFunctionReturnFlushedQueue (address at index.android.bundle:1:96486)
az_recorder_20240830_140907.mp4

@AchalaBelokar AchalaBelokar moved this from In QA to QA Failed in Avni Product Sep 5, 2024
@petmongrels
Copy link
Contributor

moving it to QA, as the prerelease environment has been refreshed

@petmongrels petmongrels moved this from In Progress to QA Ready in Avni Product Sep 9, 2024
@AchalaBelokar
Copy link

AchalaBelokar commented Sep 13, 2024

@AchalaBelokar AchalaBelokar moved this from In QA to QA Failed in Avni Product Sep 13, 2024
@petmongrels petmongrels moved this from In Progress to QA Ready in Avni Product Sep 16, 2024
@himeshr
Copy link
Contributor

himeshr commented Sep 18, 2024

Details

Env: prerelease
Org: apf
User: dineshg

Related links:
https://prerelease.avniproject.org/#/appDesigner/dashboard/616/show

Issue description

Program Encounter date filters seem to be incorrectly applied for Overdue visits as seen in following screen-recording

https://drive.google.com/file/d/1FJQ2YiOCwpZN5ZUeDg6cRz371v2k9c-_/view?usp=sharing

@himeshr
Copy link
Contributor

himeshr commented Sep 18, 2024

Details

Env: prerelease Org: apf User: dineshg

Related links: https://prerelease.avniproject.org/#/appDesigner/dashboard/616/show

Issue description

Program Encounter date filters seem to be incorrectly applied for Overdue visits as seen in following screen-recording

https://drive.google.com/file/d/1FJQ2YiOCwpZN5ZUeDg6cRz371v2k9c-_/view?usp=sharing

Based on discussions with Maha, this seems to be current behaviour on mydashboard, where-in the progEncDate filter is applied on all encounters of individual and then we search for individuals with due visits amongst them.. Instead of searching for dueVisits with scheduledDate for the ProgEncDate filter value.

@himeshr
Copy link
Contributor

himeshr commented Sep 18, 2024

THIS HAS TO BE FIXED

MyDashboard filter by registrationDate is broken.. Continue testing with Prod old apk to confirm that this was already the case earlier.

Comparision btwn APP versions 10.0 and 9.4 shows difference in results for the same user and org..
Screenshot 2024-09-20 at 12 10 27 PM

@himeshr
Copy link
Contributor

himeshr commented Sep 19, 2024

THIS IS NOT TO BE FIXED

Issues found with new(10.0) and old (9.4) version of Avni APK MyDashboard are as follows:

  • MyDashboard, Individual Registration Date filter with value causes issues on relaunch of Avni app, Count of Due and Overdue visits cards are wrong
  • MyDashboard, ProgEncounterType filter values are not set correctly on Filters Screen, though they show up in applied filters section

https://drive.google.com/file/d/1Oif2BInTycQVx-xEGGYM9rwdcsOfyBGs/view?usp=sharing

@himeshr himeshr moved this from In QA to QA Failed in Avni Product Sep 19, 2024
petmongrels added a commit that referenced this issue Sep 20, 2024
@petmongrels
Copy link
Contributor

not fixed another issue noticed

  • registration date range filter applied
  • restart app
  • filter is shown as applied but the counts are not calculated as per the filter

Same issues exists in 9.4 app

@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Sep 20, 2024
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Sep 23, 2024
@himeshr himeshr moved this from QA Ready to In QA in Avni Product Sep 23, 2024
@himeshr
Copy link
Contributor

himeshr commented Sep 23, 2024

MyDashboard filter by registrationDate is now fixed.. Did not find any new issues that were not present in older apk versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants