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

[Home]: Able to add duplicate home #380

Open
PayalChoksey17 opened this issue May 2, 2019 · 6 comments
Open

[Home]: Able to add duplicate home #380

PayalChoksey17 opened this issue May 2, 2019 · 6 comments
Assignees

Comments

@PayalChoksey17
Copy link
Collaborator

PayalChoksey17 commented May 2, 2019

Steps to Reproduce

  1. Login to application
  2. Click on Home
  3. Click on Add Home - " Haley mouth"
  4. Enter the details
  5. Repeat step 3 and step 4
  6. Notice, duplicate homes are created.

Screenshot :http://prntscr.com/njhk6b

@shailee-m shailee-m self-assigned this Jul 17, 2019
@shailee-m
Copy link
Member

shailee-m commented Jul 18, 2019

@brylie it is not possible to make home names unique groupwise as mongo does not support composite keys. is it okay to make the home names unique across all groups?

@brylie
Copy link
Member

brylie commented Jul 19, 2019

We have use-cases where homes have duplicate names across the system. E.g. "Ward 1" could be used in multiple group homes. Duplicate home names will be allowed with the multi-tenancy application, so we should carefully consider whether to take any action here.

@shailee-m
Copy link
Member

@brylie Agreed. Yet a group must have unique names so we will have to consider this while making the multitenancy app.

@brylie
Copy link
Member

brylie commented Jul 20, 2019

Can we use a pre-save hook to check for a duplicate home name in the same group when saving a home? E.g. in the AutoForm beforeSubmit or the equivalent?

@shailee-m
Copy link
Member

Can we use a pre-save hook to check for a duplicate home name in the same group when saving a home? E.g. in the AutoForm beforeSubmit or the equivalent?

Yes good for all cases. We will only have think about data import feature

@brylie
Copy link
Member

brylie commented Jul 25, 2019

There is also a collection hooks package, which may be more or less maintained.

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

No branches or pull requests

3 participants