-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix migration for resource type terms; Linked Agent field defaults to "No relation" option #50
Conversation
Keep the first one (with blank display value) because that is the point of Islandora/documentation#1770. Remove the second one because it caused a duplicate key error.
Though the Resource Types vocabulary has been updated to use the Authority Link field type, the machine name of the field is still field_external_authority_link.
This reverts commit b9d5b15.
is there/should there be an update hook for this? |
@elizoller Maybe? Don't know. An update hook was not mentioned in either of the issues I was looking at, or I wouldn't have taken them on as that's beyond what I know how to do at this point. Isn't there an existing assumption that islandora_defaults is ever just going to be installed once, initially? Which seems to suggest no need for an update hook (unless I'm wrong about what that is). I think I remember hearing discussion about whether we wanted to make it so people with existing installations could update defaults and get the new stuff (and I think that's probably a good idea if it can happen without messing up any customizations they've done), but I think it's a separate issue. |
right... i guess i'm just still slightly confused with islandora_defaults because it becomes a dependency if you use the fields from it...which is what we have going on. |
It's confusing that you get some version of it from some point in time and can't update it. I got messed up for a minute because I was working in a sandbox that Danny spun up two days ago and the machine name of the authority link field in Resource Types is Which I don't even know if that is a related thing, but it's all part of my big blob of confusion about how the pieces work together |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have a vanilla d9 islandora setup and i grabbed these two configs and did a config import partial with both of them.
for the migration config-
- originally resource types did not have the URIs in the field_authority_link
- after config import, i ran migrate:import with update like
drush migrate:import --userid=1 --uri=http://localhost:8000 --update islandora_defaults_tags
- now the resource types have URIs, yay
(worth noting that the external uris for the islandora display terms persisted)
for the field config
- after config import, i had the blank option for relationship
- i tested this in conjunction with my testing on Support blank Rel Types (Issue 1770) controlled_access_terms#64
so everything looks good and i'll go with not worrying about the update hook
i'm not sure how you'll want to handle documentation changes though |
Thanks for testing! |
I will make an issue assigned to me to update the documentation. I don't think it's a blocker --- more of a good citizen FYI act from one metadata person to another. |
for sure |
GitHub Issue: Islandora/documentation#1531, Islandora/documentation#1770
Release pull requests, etc.)
na
What does this Pull Request do?
What's new?
Updates default tags migration so that the value of the
external_uri
field in the tags CSV will be ingested intofield_authority_link
if a vocabulary (such as Resource Types) uses this field instead offield_authority_link
. This change was suggested by @kayakr hereUpdates
field_linked_agent
config to...relators:asn
with an empty string display value the first (i.e. de-facto default) value in therel_types
listrelators:asn|Associated name
from therel_types
list because it caused a duplicate key error.Does this change require documentation to be updated?
I think it would be best to note in the documentation for this field that the default values that ship include the following deprecated terms:
In stripping out the parenthetical info in the display values, we removed any indication of the fact that these terms are deprecated. Some institutions may want to remove them from the list or re-add the deprecated/use note, depending on their needs.
Does this change add any new dependencies? Yes, @seth-shaw-unlv is making some changes to the Typed Relation field type in
controlled_access_terms
that are related to the changes made tofield_linked_agent
Does this change require any other modifications to be made to the repository
(i.e. Regeneration activity, etc.)? Not sure/don't think so
Could this change impact execution of existing code? Not sure/don't think so.
How should this be tested?
Sorry these are going to be vague...
the migration part (1531)
I was not able to test this in our development environment because it is rebuilding from configs instead of actually starting from scratch and using the islandora_defaults code. Further, Nigel has disabled the migration from being picked up in our instances because it was causing a problem for something else (?), so I couldn't manually run it.
I believe to test the migration part you will need to spin up a brand new Islandora completely from scratch. Or do something clever to get the migration config into an existing instance and manually run it.
After the migration runs, examine a term in the Resource Types vocabulary and ensure the authority link from the tags CSV has been imported into the Authority Link field.
the field config part (1770)
I was able to test this by doing
drush config:import --partial --source PATH/TO/ISLANDORA_DEFAULTS/CONFIG/INSTALL
on a branch in our dev environmentFor me, this command got one error or warning unrelated to changes made here: apparently the field type of
field_description
changed at some point and now there's data in the field so it's a problem. If you see this, just ignore it.Steps to test:
To test further, I think there is a dependency on further work @seth-shaw-unlv is doing on formatter/display for the Typed Relation field type in controlled_access_terms
Additional Notes:
Not thinking of anything, other than next time I'm going to make two separate PRs for two separate issues instead of combining them like this. Seemed like it was going to be easier and Seth said it was fine, but it's bugging me :-)
Interested parties (not already tagged)
@mjordan @rosiel @dannylamb