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

Restrict duplicate phone numbers #841

Open
mahalakshme opened this issue Dec 19, 2024 · 0 comments
Open

Restrict duplicate phone numbers #841

mahalakshme opened this issue Dec 19, 2024 · 0 comments

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Dec 19, 2024

Need:

  • Restrict duplicate phone numbers to 5. If two farmers have the same name, then don't count them as duplicates

Suggested technical approach:

  • Add a custom query that returns the no of individuals with same phone number but different first name and last name than the ones in the request. For farmers with same name and same mobile numbers should not be counted as 2.
  • Make validation rule async(for now mobile app alone) - refer this
  • From the mobile app validation rule, call /executeQuery api and show the error stating 'Number of times this mobile number can be used has exceeded than the allowed limit' if the number of duplicate mobile numbers with different names exceed 5. This error message should be translatable. Suggest doing in form element or form element group rule unless we are sure it will cause performance issues.
  • If API call doesn't go through, then show the error 'Switch on your internet connection.' This error message should be translatable.

Questions:

Why not form element rule or form element group rule we can do it in?

@mahalakshme mahalakshme converted this from a draft issue Dec 19, 2024
@mahalakshme mahalakshme changed the title [Spike] Restrict duplicate phone numbers Restrict duplicate phone numbers Dec 19, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Analysis Review
Development

No branches or pull requests

1 participant