Skip to content

[Publication Module] Duplicate Lead Investigator Email Issue #9719

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sruthymathew123
Copy link
Contributor

Brief summary of changes

Lead Investigator email should be unique for each publication. Same name can be there; but email should be different to uniquely identify publication. So fixing the code to work in that way and fix the duplicate entry '***' for key 'UK_publication_collaborator_Email issue.

Link(s) to related issue(s)

@sruthymathew123 sruthymathew123 added 27.0.0 - Bugs Bugs Found in LORIS 27 testing Module: publication PR or issue related to the publication module labels Mar 18, 2025
@sruthymathew123 sruthymathew123 changed the title Publication Module Duplicate Email Issue [Publication Module] Duplicate Lead Investigator Email Issue Mar 18, 2025
Copy link
Contributor

@racostas racostas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we cannot limit the Lead Investigator to only one publication. It's very common in CCNA and I think in most projects that there is one Lead Investigator for many projects - usually this person is a PI having multiple projects under she's/he's mentoring.

I also notice that for the same module when "editing" a project (in place of creating a new one) and the same situation arrives -- filling the email of a Lead Investigator that already exist but with a different name --- what happens is that the Name field get overridden for the new name for all existing proposals
image

... I think I prefer this behavior that not allow to create the project because the name for the lead investigator is different to other with same the same email address.

.. but ideally what should happen instead if a lead investigator is filled with a same email but different "name" I think it's to show a modal windows to the user asking for confirmation if the user wants to:

1 -"reuse" an existing name associated with the existing email.
2 - use the new name and update this name for the already existing emails in all others publications (the current behavior when editing a project)
3 - just to create a new entry with the same existing email but other "name" associated to it for the current new project, and to leave the other projects the way they were before.

What do you think @sruthymathew123 ?
We can discuss a bit more in the LORIS call as well . It should be more clear if we talk about it in person.
Thanks !

@racostas racostas added State: Needs work PR awaiting additional work by the author to proceed State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed labels Apr 14, 2025
@sruthymathew123
Copy link
Contributor Author

@racostas For HBCD project, we are not using this module. So I don't know about the use cases; I was just trying to focus only on the error reported. I am ok with making the required change once approved. At present, I can see the current use case expects unique lead investigator email.

@racostas
Copy link
Contributor

Per discussion today:

  • We can have the many project to many Lead Investigator feature in a new PR (this feature is highly desirable)
  • We can merge this PR that fixes the 500 error ( issue originally reported).

@racostas racostas removed State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed State: Needs work PR awaiting additional work by the author to proceed labels Apr 15, 2025
@racostas racostas self-requested a review April 15, 2025 16:54
Copy link
Contributor

@racostas racostas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

some comments to address as a very desired feature.

@racostas racostas added this to the 27.0.0 milestone Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27.0.0 - Bugs Bugs Found in LORIS 27 testing Module: publication PR or issue related to the publication module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[publication] No error message for duplicate investigator email
2 participants