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

[DEA] Enhance Sync attribute settings #779

Closed
mahalakshme opened this issue Aug 28, 2024 · 7 comments
Closed

[DEA] Enhance Sync attribute settings #779

mahalakshme opened this issue Aug 28, 2024 · 7 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Aug 28, 2024

Need:

When there are many sync attribute values added as on need basis, it is difficult to update the users with the new sync attributes, especially when full access need to be given on DEA.

AC:

  • Have a toggle that says 'Do not restrict on Data Entry App'.
  • Default value for it is false
  • When enabled, then don't apply the sync attribute restriction on DEA alone

User settings on Edit:

Screenshot 2024-08-29 at 11 35 23 AM

User settings on Show:

Screenshot 2024-08-29 at 11 35 32 AM

Old: Ignore

AC:

  • When sync attribute value is 'any' for text and numeric concepts in the User page, then do not apply the 'sync attribute' restriction and should sync based on whatever other sync strategies are configured.
  • Not applicable for coded concepts
  • Only applicable for text and numeric fields
  • Should work(sync) the same in mobile app as well
  • Default value is 'any' for text and numeric
  • Even if one of the values is 'any' then do not apply the sync attribute restriction

Analysis:

Why not mentioning any value for sync attribute is not considered as sync everything?

  • Generally users forgot to set the sync attribute or catchment - then everything will get synced and they will not realise that their sync configuration is incomplete
  • For individual assignment and catchment, when not set, we don't sync anything - and that is reasonable inline with the need and what is intuitive
  • To make it evident - when something not set as sync attribute - it is not evident that everything will be synced.

Why only applicable for text and numeric fields:

  • it for these types that values can be of wide range
  • for coded we currently only show the configured answers - creating a default answer or allowing the user to type 'any' and error handling for these - all these will add unnecessary complexity

Can we set any for numeric field:

Yes, the way we store the value of sync attributes - it is allowed to be stored.

Questions:

  • Should we just consider {}(default value when no sync attribute set) as any field?
    • Sync attributes then should be mentioned only when needed to restrict, and other strategies are based on allowing
    • Not consistent with other strategies - but anyways it is a different strategy
    • How to make the above evident: rename it to 'Sync Restriction Settings'?
    • In mobile app as well, need to work like this
    • None of the active users have sync_settings empty, so not an issue

Inputs:

  • Mandatory -
  • user sync settings -
@mahalakshme mahalakshme converted this from a draft issue Aug 28, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Aug 28, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Aug 29, 2024
@mahalakshme mahalakshme changed the title When sync attribute is any, then consider only the other sync strategies [DEA] Enhance Sync attribute settings Aug 29, 2024
@himeshr himeshr self-assigned this Aug 29, 2024
himeshr added a commit to avniproject/avni-webapp that referenced this issue Aug 29, 2024
himeshr added a commit that referenced this issue Aug 29, 2024
…ccess to transactional entities within Catchment but not matching sync settings
himeshr added a commit that referenced this issue Aug 29, 2024
… transactional entities within Catchment but not matching sync settings
@himeshr
Copy link
Contributor

himeshr commented Aug 29, 2024

Sample Screenshots for the User flag

Screenshot 2024-08-29 at 6 24 06 PM Screenshot 2024-08-29 at 6 23 51 PM Screenshot 2024-08-29 at 6 23 41 PM

@himeshr himeshr moved this from In Progress to Code Review Ready in Avni Product Aug 29, 2024
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Aug 30, 2024
@AchalaBelokar
Copy link

AchalaBelokar commented Aug 30, 2024

  • I tried with maha@goonj I change the sync concept inventory remove jaipur from but still I am not able to create inventory item.
  • I login the AchalaB@rwbnitiuat I change sync attribute year changed and checked dea it is showing all the year

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

himeshr commented Aug 30, 2024

  • I tried with maha@goonj I change the sync concept inventory remove jaipur from but still I am not able to create inventory item.
  • I login the AchalaB@rwbnitiuat I change sync attribute year changed and checked dea it is showing all the year
  • The first error scenario is valid, as the user maha@goonj only has Thane district in catchment test
  • The second scenario is also valid, as view is allowed in DEA irrespective of catchment or sync settings per subjectType. Only Create, edit and void are restricted in DEA based on catchment and SyncSettings.

@himeshr himeshr moved this from QA Failed to QA Ready in Avni Product Aug 30, 2024
@AchalaBelokar
Copy link

  • Login with maha@goonj and created inventory item ass and try to edit with Center / Field office goonj with Goonj Than it is showing me right message and after that I fill correct the Goonj Thane it is not allow me to save that inventory item.
Screen.Recording.2024-09-04.at.1.09.57.PM.mov

@mahalakshme mahalakshme moved this from In QA to QA Failed in Avni Product Sep 4, 2024
@himeshr
Copy link
Contributor

himeshr commented Sep 4, 2024

@AchalaBelokar this is again a valid error, during edit, User is allowed to modify the entity, only if the previous sync attribute was valid for that user.
As specified in your comment, the previous value for sync attribute was "goonj", which is not valid for user maha@goonj as it needs it to be "Goonj Thane".

@himeshr himeshr moved this from QA Failed to QA Ready in Avni Product Sep 4, 2024
@Dinesh2019
Copy link

  • User has the sync setting as no and in the sync attribute as Goonj Thane and if we edit center and account as goonj thane and save it after that if we change the thane to some other attribute the system saves the form with out showing any error.
  • If the edit the same inventory at that time it is displaying an error and if we change the account name again as thane then expected it should save the form but it is still displaying the error.

Refrence video :

Click here to watch video

@Dinesh2019 Dinesh2019 moved this from In QA to QA Failed in Avni Product Sep 4, 2024
@himeshr
Copy link
Contributor

himeshr commented Sep 5, 2024

@AchalaBelokar and @dinesh2096 i see that the card is now in QA Failed, if this was on purpose, specify the issue here.

@himeshr
Copy link
Contributor

himeshr commented Sep 5, 2024

@dinesh2096 The errors and app behaviour seen in this video are all valid..
https://drive.google.com/file/d/1Mme0mjT-qHXjLNzHvANQiHp2PIveHAFn/view?usp=drive_link

During create, the new SyncAttribute value and location specified should match the user sync settings and catchment
During Edit, the previous value for the SyncAttribute and locations should match the user's catchment and sync settings

@Dinesh2019 Dinesh2019 moved this from QA Failed to In QA in Avni Product Sep 5, 2024
@Dinesh2019 Dinesh2019 moved this from In QA to Done in Avni Product Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants