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

Affiliation names should be updated to use the default provided by ROR #3824

Open
ahamelers opened this issue Dec 10, 2024 · 1 comment
Open
Assignees
Labels
ROR Research Organization Registry Tech Debt

Comments

@ahamelers
Copy link
Collaborator

ahamelers commented Dec 10, 2024

From #3823.

We only use one name from the set of available names for ROR-matched organizations in our database. This name should be the default name for the ROR org.

Users type in text for Affiliations, which we match to a ROR org. The text may not be matched to a ROR org at first, but if it is matched later, the name should be updated to the default. In the case below, however, an "alias" in the ROR orgs table is set as the name for the Affiliations table.

This could be because which name is the default was, at some point, changed by ROR itself. When the default name is updated by ROR, it should be changed in all related tables as well, not just in the ROR orgs table. A check that ROR names match ROR IDs in affiliations and contributors should be written and run now, and then tied into the monthly ROR update.

StashEngine::RorOrg.find_by(ror_id: 'https://ror.org/05f82e368')
=> 
#<StashEngine::RorOrg:0x00007f14a0144928
 id: 105646,
 ror_id: "https://ror.org/05f82e368",
 name: "Université Paris Cité",
 home_page: "https://u-paris.fr/en",
 country: "France",
 acronyms: [],
 aliases: ["University of Paris", "Université de Paris"],
 isni_ids: ["0000 0004 7885 7602"],
 created_at: Mon, 26 Feb 2024 05:19:42.000000000 UTC +00:00,
 updated_at: Mon, 26 Feb 2024 05:19:42.000000000 UTC +00:00>
StashDatacite::Affiliation.where(ror_id: 'https://ror.org/05f82e368')
=> 
[#<StashDatacite::Affiliation:0x00007f14a0137778
  id: 42846,
  short_name: nil,
  long_name: "University of Paris",
  abbreviation: nil,
  created_at: Fri, 16 Apr 2021 02:28:48.000000000 UTC +00:00,
  updated_at: Fri, 16 Apr 2021 02:28:48.00000
  ror_id: "https://ror.org/05f82e368">]
@ahamelers
Copy link
Collaborator Author

There appear to be 1965 affiliations where the affiliation name does not equal the matched ror org name.

StashDatacite::Affiliation.joins(:ror_org).where('long_name != name').count
=> 1965

@alinvetian alinvetian self-assigned this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ROR Research Organization Registry Tech Debt
Projects
Status: Backlog
Development

No branches or pull requests

2 participants