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

Store 7.x cannonical URL for resource migrated to CLAW #822

Open
mjordan opened this issue Apr 28, 2018 · 6 comments
Open

Store 7.x cannonical URL for resource migrated to CLAW #822

mjordan opened this issue Apr 28, 2018 · 6 comments
Labels
Type: use case proposes a new feature or function for the software using user-first language.

Comments

@mjordan
Copy link
Contributor

mjordan commented Apr 28, 2018

Title (Goal) Store 7.x cannonical URL for resource migrated to CLAW
Primary Actor Repository admin
Scope Specific service
Level High
Story As a repository admin migrating content from 7.x to CLAW, I want to be able to store each 7.x object's URL as a property of the migrated object. In other words, for each newly migrated object in CLAW, I want to be able to access its previous address on the web.
@mjordan
Copy link
Contributor Author

mjordan commented Apr 28, 2018

Some possible uses I would put this stored URL to:

  • I want my users to be automatically redirected from the old /islandora/object/foo:bar-style URLs to the corresponding new /node/baz-style URLs.
  • To ensure continuity of PREMIS events across the migration, I want to be able to assemble all the fixity validation events for a given datastream/binary resource that was migrated from 7.x to CLAW.
  • To collect usage statistics across the period when the migration occurred, I want to be able to aggregate usage for a resource in CLAW with its version in 7.x.

@mjordan
Copy link
Contributor Author

mjordan commented Apr 28, 2018

During our migration from CONTENTdm to Islandora, we added the previous URL to our MODS like this:

<identifier type="uri" invalid="yes" displayLabel="Migrated From">http://content.lib.sfu.ca/cdm/ref/collection/foo/id/14</identifier>

and used those URLs to provide auto-redirection.

@mjordan
Copy link
Contributor Author

mjordan commented Jul 20, 2018

@dannylamb can we include this in the sprint?

@dannylamb
Copy link
Contributor

@mjordan It will definitely get handled then. That plus a /islandora/object/{pid} url alias with pathauto. I've been very careful not to use that route so that it's available for people who want to keep urls when migrating.

@mjordan
Copy link
Contributor Author

mjordan commented Jul 23, 2018

Nice. Funny you should mention creating a path alias, I am doing this to keep the old URLs from our IR during our migration to Islandora 7.x in a hook_islandora_object_ingested:

/**
 * Inserts a path alias.
 *
 * @param string $pid
 *   A PID.
 * @param string $old_nid
 *   The item's old Summit node ID.
 */
function islandora_summit_migration_insert_path_alias($pid, $old_nid) {
  return db_insert('url_alias')
    ->fields(array('source' => 'islandora/object/' . $pid, 'alias' => 'item/' . $old_nid, 'language' => 'und'))
    ->execute();
}

@mjordan
Copy link
Contributor Author

mjordan commented Dec 22, 2018

A module that creates the alias is at https://github.com/mjordan/islandora_pid_alias.

@kstapelfeldt kstapelfeldt added Type: use case proposes a new feature or function for the software using user-first language. and removed use case labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: use case proposes a new feature or function for the software using user-first language.
Projects
Development

No branches or pull requests

3 participants