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

Task/des 2558 updates to metadata #1134

Merged
merged 12 commits into from
Dec 12, 2023
Merged

Conversation

van-go
Copy link
Contributor

@van-go van-go commented Nov 30, 2023

Overview:

  1. Updates to list of Data Types for project type Other
  2. Updates to list of Field Research types
  3. Allow custom write-in for FR Type 'Other'
  4. Updates to list of Natural Hazard Types

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

Updates to search_utils.py and project-form-options.json
Changes to manage-project.template.html to allow custom write-in

Testing Steps:

  1. Use a type Other project to test changes to Data Types
  2. Use a type FR to test changes to FR Types; including adding a write-in type
  3. Use any other type to test changes to NH Types

UI Photos:

Notes:

I create a project with an now removed Data Type option(Field Survey). In both published and projects, the old Data Type appears as text (not drop-down option). The user can leave the text as is, or delete the text, then the drop-down full of options appears for them to choose from. Changes appear in Published.

Another part of this ticket was to allow multiple Data Types. I moved this to DES-2570 which is a request to allow multiple facilities. These can be worked on together when we decide how to handle changes to data types (string to list).

@jarosenb
Copy link
Member

jarosenb commented Dec 1, 2023

I think the new additions are good, but we should hold off on the places (like fire->wildfire) where one dropdown value changes into another. The reason is that it creates an issue with legacy metadata when it comes to search filtering in publications. For instance with fire->wildfire, changing the value in the search filters will cause us to exclude old "fire" publications unless we hard-code a workaround into the search. Then we're stuck maintaining that workaround forever.

The more maintainable way to support these changes would be a name/label system like with facilities, so old projects would have {name: "fire", label: "fire"} and newer ones would be {name: "fire", label: "wildfire"}. Then in Advanced Search, filtering on the name "fire" picks everything up. This will involve some metadata migrations that we can set up in a separate PR.

Copy link
Member

@jarosenb jarosenb left a comment

Choose a reason for hiding this comment

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

LGTM. We'll create another ticket to merge fire/wildfire.

@jarosenb jarosenb merged commit 4568564 into main Dec 12, 2023
2 checks passed
@jarosenb jarosenb deleted the task/des-2558-updates-to-metadata branch December 12, 2023 18:13
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.

2 participants