-
Notifications
You must be signed in to change notification settings - Fork 175
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
[publication] Lead investigator issue #7471
[publication] Lead investigator issue #7471
Conversation
This is failing the tests and can you please update the description to be more descriptive. |
@pierre-p-s tests are now passing but I have no idea why this PR is making that change. can you please add a description with a detail issue and fix ? |
@pierre-p-s I just tested on demo and I cannot reproduce the error. |
@pierre-p-s I updated the description to the best of my capacity Now that I understand the issue a bit more and given the possibility or emails not being unique in this usecase, I think the collaborator table should have a combined primary key of name and email which should low significantly the risk of an overlap and an incorrect display |
@ridz1208 I changed the OR to an AND. |
not approving yet until we discuss the intended functionality
Brief summary of changes
As it currently stands, when a publication is proposed (tab: propose a project) the user is asked, amongst other things, for a lead investigator name and email if these values are not already in the database, they get inserted into the collaborator table, if they do already exist they get linked to the new project.
The issue here is when 2 or more users share a name and/or an email address (project address like cbigr@mcin.ca for example) Since the SQL query currently uses and
OR
operator, the query returns the first name that matches or the first email that matches without checking the other value causing in some instances to select the wrong investigator and displaying the incorrect name or email in the menu filter.Solves issue from CCNA: https://github.com/aces/CCNA/issues/4555
Testing instructions (if applicable)