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

Feature/custom fields #27

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Feature/custom fields #27

merged 2 commits into from
Jan 22, 2025

Conversation

J4bbi
Copy link
Collaborator

@J4bbi J4bbi commented Jan 14, 2025

This PR adds 115 custom fields using the mex: namespace.

These custom fields are derived from the 3.4.0 version of the MEx metadata model.

There is some validation implemented using little effort but this should not be required as incoming data will already have been validated using the model.

The mex:identifier field is the only required custom field.

The resource types vocabulary has been replaced with 11 MEx entity types. Please verify that these are the correct entity types.

The custom nested field class MultiLanguageTextCF is modelled on the MEx text field.

Templates

Three templates has been amended, records/detail.html which includes records/details/mex_details.html and records/macros/mex_detail.html only in order to list custom fields the same way Datacite fields are listed by default on the landing page.

The templates have also been changed to not expect a props property defined in the RDM_CUSTOM_FIELDS_UI config variable. In other words, if these amended templates were not used, Jinja would throw an error expecting each field in that config variable to have a props property set.

Unresolved

This PR does not have unit tests. They are coming soon in a PR for importing data.

There are still decisions to be made on the searchability of these custom fields, if and then how they are searched on or faceted.

@fdiehr
Copy link

fdiehr commented Jan 14, 2025

The resource types vocabulary has been replaced with 11 MEx entity types. Please verify that these are the correct entity types.

I confirm, that these are the correct entity types.

Copy link
Collaborator

@varadekd varadekd left a comment

Choose a reason for hiding this comment

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

Verified the changes made, everything looks good to me.

@amdomanska amdomanska mentioned this pull request Jan 15, 2025
2 tasks
@J4bbi J4bbi merged commit 8eca25b into main Jan 22, 2025
1 check passed
@J4bbi J4bbi deleted the feature/custom_fields branch January 22, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants