icgc-argo / dac-api

Development of the Data Access Control API
GNU Affero General Public License v3.0
0 stars 0 forks source link

Validate that there is no repeated emails between applicant-> collaborator #151

Closed akachru-github closed 3 years ago

akachru-github commented 3 years ago

Required for: https://github.com/icgc-argo/dac-ui/issues/329

For testing

justincorrigible commented 3 years ago

As requested in planning, here is the error message displayed under the UI fields: The applicant does not need to be added as a collaborator

However, I believe the API already has a determined error for this validation, which works well for us.

rosibaj commented 3 years ago

@anncatton how in progress is this ticket?

anncatton commented 3 years ago

@rosibaj i set up the collaborator errors to return the specific email field with the issue, like: { field: 'institutionEmail', message: 'The applicant does not need to be added as a collaborator.', }, { field: 'googleEmail', message: 'The applicant does not need to be added as a collaborator.', } So it can be possible for one collaborator to have up to 2 email errors. Do you want more specific info in the message portion?

rosibaj commented 3 years ago

@anncatton i think that this is sufficient! if you think its workign then we just need @kcullion to give it a quick QA later!

kcullion commented 3 years ago

@anncatton @rosibaj I can't find where this bug would have been - I see the error messages working as expected.

anncatton commented 3 years ago

I tested with new applications...i'm not sure if there are any existing ones in the right state?

kcullion commented 3 years ago

I tested with a new application too @anncatton - so this should be good if it works in new applications. Thanks! Oh we may have just kept this ticket for testing with the UI