Skip to content

Conversation

klpoland
Copy link
Collaborator

@klpoland klpoland commented Sep 19, 2025

@lucaspar run reverse migration 0016_reverse_authors_to_string_format in QA to check it works.

@klpoland klpoland requested a review from lucaspar September 19, 2025 21:34
@klpoland klpoland self-assigned this Sep 19, 2025
@klpoland klpoland added feature New feature or request gateway Gateway component labels Sep 19, 2025
@klpoland
Copy link
Collaborator Author

This is going to have a migration conflict with PR #184, so should merge that one first and then order this one. This is because I added a migration to convert the dataset authors (started out with a command but wanted a more automated way to do the conversion to include name and ORCID ID).

@lucaspar lucaspar added the migrations Code changes that require data or schema migrations in the database. label Sep 25, 2025
@lucaspar lucaspar requested a review from Copilot September 30, 2025 18:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds ORCID ID support to the user model and updates the dataset authors system to store author information as objects containing both name and ORCID ID fields, transitioning from a simple string-based format.

  • Adds orcid_id field to the User model for storing researcher identifiers
  • Converts dataset authors from string format to object format with name and ORCID ID fields
  • Includes data migration to convert existing author data to the new object format

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
gateway/sds_gateway/users/models.py Adds orcid_id CharField to User model
gateway/sds_gateway/users/migrations/0011_user_orcid_id_alter_user_is_approved.py Django migration adding ORCID ID field and updating user approval default
gateway/sds_gateway/api_methods/models.py Adds get_authors_display() method for backward compatibility with new author object format
gateway/sds_gateway/api_methods/migrations/0016_convert_dataset_authors_to_object_format.py Data migration converting existing author strings to object format
gateway/sds_gateway/users/migrations/max_migration.txt Updates migration tracking file
gateway/sds_gateway/api_methods/migrations/max_migration.txt Updates migration tracking file

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@klpoland
Copy link
Collaborator Author

klpoland commented Oct 1, 2025

Note: @lucaspar run reverse migration 0016 reverse_authors_to_string_format in QA to check it works

@klpoland klpoland force-pushed the feature-kpoland-orcid-integration branch from 4d618e6 to e24d240 Compare October 1, 2025 18:07
Copy link
Member

@lucaspar lucaspar left a comment

Choose a reason for hiding this comment

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

thanks

@klpoland klpoland merged commit e99b20b into master Oct 1, 2025
@klpoland klpoland deleted the feature-kpoland-orcid-integration branch October 1, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request gateway Gateway component migrations Code changes that require data or schema migrations in the database.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants