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

Default filters not to break in older version of client #782

Open
mahalakshme opened this issue Sep 5, 2024 · 5 comments
Open

Default filters not to break in older version of client #782

mahalakshme opened this issue Sep 5, 2024 · 5 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Sep 5, 2024

Issue:

Currently when we make the custom default dashboard as the primary dashboard it will not work in older versions of mobile app since 'subject type' filter and 'as on date' filter were not supported before and the app is seen to crash like below:

Image

AC:

  • Do not sync 'default dashboard' and its marking as primary dashboard, in the current API used to fetch these info
  • For 10.0 and future versions of app, create a new API which will sync the 'Default Dashboard' as well and its marking as primary dashboard as well. Keep what will be synced as part of this API as much minimum as possible so that in future we can merge the code easily.
  • It should work for below scenario as well:
    - User user1 is in 9.4 of shelter
    - Shelter is migrated to use new default custom dashboard at time t
    - But user1 sees MyDashboard since he is in 9.4
    - Implementor adds new dashboard called 'Slums not audited' at time t+1
    - user1 gets 'Slums not audited' on sync
    - user1 updates the app to 10.0
    - user1 should get 'new default dashboard' added as the primary dashboard
  • Any new filter, dashboard, report card, group dashboard created or modified after 09-09-2024 (this date can be changed) should not sync to the app if the version of the app is < 10.0.
@petmongrels petmongrels self-assigned this Sep 5, 2024
petmongrels added a commit to avniproject/avni-models that referenced this issue Sep 9, 2024
petmongrels added a commit to avniproject/avni-client that referenced this issue Sep 9, 2024
petmongrels added a commit that referenced this issue Sep 9, 2024
petmongrels added a commit that referenced this issue Sep 10, 2024
…then between approach will serve the newer report entities, hence using greater and less than.
@petmongrels
Copy link
Contributor

code review

  • please review the core logic of avoiding sync, if you can see any issues, it is critical.

petmongrels added a commit that referenced this issue Sep 10, 2024
…leaf entity and has to be used by report card to cause any issue
petmongrels added a commit to avniproject/avni-models that referenced this issue Sep 10, 2024
@himeshr
Copy link
Contributor

himeshr commented Sep 10, 2024

Code review comments, 2 things pending:

  • models version upgrade after groupDashboard apiVersion change
  • Undo StandardReportCardType versioning (Needs discussion)

Additionally, a small Support write-up on handling update of lastModifiedDateTime, to sync Dashboard related entities to old clients, for orgs with change only in old config

petmongrels added a commit to avniproject/avni-client that referenced this issue Sep 10, 2024
@himeshr
Copy link
Contributor

himeshr commented Sep 11, 2024

@petmongrels, Found 1 issue as of now during QA:

  • After deploying 10.0 latest code on prerelease,
  • I had set the following property, export AVNI_ENDPOINT_END_OF_LIFE_1=2024-09-05
  • and restarted the backend server

Inspite of this, on first time sync of AchalaB@shelteruat user, i still received Custom Dashboards with names "Default Dashboard", 'htestdash' and 'htestdash2' which were created /updated on 09-sep-2024, which shouldn't be the case.

Screenshot 2024-09-11 at 6 41 12 PM Screenshot 2024-09-11 at 6 41 27 PM Screenshot 2024-09-11 at 6 42 31 PM

himeshr added a commit that referenced this issue Sep 12, 2024
…overrides the previous value if request param is expecting a single value, or else use the whole list if its expecting a collection
@himeshr
Copy link
Contributor

himeshr commented Sep 13, 2024

Its now Working as designed..
Pending tasks before deployment:

  • Write up for implementation team on how to handle sync for new changes post EndOfLifeDate that do not use 10.0 features
  • Configuring the EndOfLifeDate suitably on avni-server as part of infra

@himeshr himeshr closed this as completed Sep 13, 2024
@mahalakshme
Copy link
Contributor Author

Add documentation for workaround for backward compatibility issue(new report cards not working with old client) explaining the usecase in readme - under Implementors guide - somewhere linking this guide - needed to communicate further with implementation team

@mahalakshme mahalakshme reopened this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA Failed
Development

No branches or pull requests

3 participants