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

Correct concept values for primary name/title #1285

Closed
wants to merge 1 commit into from

Conversation

jacobtylerwalls
Copy link
Member

Fixes #1284

Testing instructions

  • Check the graph editor for Sample Info, take note of the concept values allowed for name
  • Check this PR sets them (primary title, alternate titles)
  • Check the graph editor for Physical Thing, take note of the concept values allowed for name
  • Check this PR sets a reasonable choice (primary name)

@chiatt
Copy link
Member

chiatt commented Sep 14, 2023

We may need a migration to modify any existing records that users have already created. I don't think we necessarily need to do this as part of this PR, however the SQL to make that change would be something like this:

UPDATE tiles
SET tiledata = jsonb_set(tiledata, '{b9c1d7ab-b497-11e9-9ab7-a4d18cec433a, 0}', '"0798bf2c-ab07-43d7-81f4-f1e2d20251a1"'::jsonb)
WHERE EXISTS (
  SELECT 1
  FROM jsonb_array_elements(tiledata->'b9c1d7ab-b497-11e9-9ab7-a4d18cec433a') AS element
  WHERE element::text = '"8f40c740-3c02-4839-b1a4-f1460823a9fe"'
);

@chiatt
Copy link
Member

chiatt commented Sep 15, 2023

Thanks for your Testing instructions @jacobtylerwalls. When going through them I noticed that the default value for the name type node is also preferred terms so we may need to also make a minor change to the graph design. I'm going to confirm this before we make any more changes.

The preferred terms concept value was not a valid
concept value for the concepts "Name Types - Generic"
(sampling info) and "Name Types - Physical Thing" (sample)
@chiatt
Copy link
Member

chiatt commented Oct 11, 2023

It turns out that we need to continue to use 'preferred terms'. The reason why this caused issues with the bulk loader is because preferred terms concept was assigned as the default value despite the fact that 'preferred terms' was not included in the collection (re #1330).

@chiatt chiatt closed this Oct 11, 2023
@jacobtylerwalls jacobtylerwalls deleted the 1284_concept_value_load_error branch October 11, 2023 19:06
@jacobtylerwalls jacobtylerwalls removed the request for review from chiatt October 11, 2023 19:06
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.

Sampling info and sample phys thing tiles use incorrect concepts for name
2 participants