Add ROR Support for Institutions#2135
Merged
Merged
Conversation
…uggestion list. Automatically extract and populate metadata fields (e.g., ROR ID, city, country, webpage) based on the selected institution.
…itution search - Modify the UI to allow users to select an existing institution or add a new one when creating a project. - Integrate local institution search from SEEK system. - Implement remote institution search via ROR API. - Use typeahead for enhanced user experience with suggestions from both local and remote datasets.
…ed ones or remotely ROR
stuzart
reviewed
Feb 26, 2025
stuzart
requested changes
Mar 3, 2025
fbacall
reviewed
Mar 4, 2025
fbacall
left a comment
Contributor
There was a problem hiding this comment.
I still think you should fetch all the metadata from ROR on the backend if a ror_id is present (especially since you are calling out to it to validate anyway).
for example:
before_validation :fetch_from_ror, if: -> { ror_id.present? && ror_id_changed? }
def fetch_from_ror
response = Ror::Client.new.fetch_by_id(ror_id)
if response[:error]
errors.add(:ror_id, response[:error])
else
# ... assign attributes based on ROR response
end
endThis would allow easy creation of institutions by just passing Institution.new(ror_id: "123abc")
… The metadata fetched from ROR will overwrite any user-provided inputs if there is a discrepancy between them.
…te and update tests in projects_controller_test.rb
…tion and adds error if ROR ID is invalid
stuzart
approved these changes
Mar 13, 2025
fbacall
approved these changes
Mar 13, 2025
fbacall
left a comment
Contributor
There was a problem hiding this comment.
Just one minor comment, but otherwise looks good
…valid column option in a migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ROR (Research Organization Registry) is an open, community-driven registry of research organizations worldwide. It provides a unique, persistent identifier (ROR ID) for institutions, making it easier to disambiguate organizations in research data. ROR IDs are openly available, interoperable with other identifier systems (like ORCID and CrossRef), and designed for integration into research workflows.
This PR introduces ROR support in the institutions module. Users can enter institution data in three ways:
The metadata for options 1 and 2 is fetched directly from ROR's API.
Additionally, ROR integration has been extended to project creation, enabling users to associate projects with institutions—either from locally stored data or dynamically fetched from ROR.
Improvements in Details
Database
Added a new column
ror_idto the institutions table.Ensured
ror_idis unique for institutions.UI
Added the new input field of ROR ID
The ROR ID is displayed as a clickable link in the institution details.
Added a "clear fields" button when creating institutions.
Disabled input fields when
metadata is loaded either from locally stored data
or dynamically fetched from ROR.
or editing an institution with an existing ROR ID.
Improved CSS and JavaScript for better responsiveness.
Functionality
Users can type an institution name and see a suggested list with ROR data.
ROR ID validation implemented to prevent incorrect entries.
Improved error messages when an invalid ROR ID is entered.
Users can fetch institution metadata via ROR ID.
When creating an institution along with a project, the ROR ID is now saved properly.
Converted country codes to full country names for better readability.
Added
ror_idto the Institution API (Read/Write).Updated API examples to include the new
ror_idattribute.