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

Onestop ID lineage/deaccessioning #332

Closed
9 tasks done
drewda opened this issue Jan 26, 2016 · 5 comments · Fixed by #910
Closed
9 tasks done

Onestop ID lineage/deaccessioning #332

drewda opened this issue Jan 26, 2016 · 5 comments · Fixed by #910
Assignees

Comments

@drewda
Copy link
Member

drewda commented Jan 26, 2016

changing the Onestop ID on an entity

  • a new changeset action: changeOnestopID
  • when the changeset is applied, it sets action=change_onestop_id in the old_ entities record
  • find_by_onestop_id methods will now search through both the current_ and old_ entities records. Will redirect to the entity with the current Onestop ID

destroying an entity with a Onestop ID

  • uses the existing destroy changeset action
  • when the changeset is applied, it sets action=destroy in the old_ entities record
  • find_by_onestop_id methods will now search through both the current_ and old_ entities records before returning their results. If a Onestop ID has been deleted, the API will indicate that.

merging entities with multiple Onestop IDs into one

  • add new mergechangeset action that takes in an array of Onestop IDs and one entity/Onestop ID for the target/survivor

  • when the changeset is applied, set action=merge in the old_ entity records and point their current column to the target/survivor

  • find_by_onestop_id methods will now search through both the current_ and old_ entities records before returning their results. For merged records, redirect to the target/survivor

  • add callbacks to merge and change. Specifically, when Feed onestop id changes, the S3 link might need updating (related to Remove Feed onestop_id from s3 filenames #895; may not be an issue), and the stop_pattern onestop id in the RouteStopPattern stop_pattern attributes needs to be updated.

After this is in place:

  • When geometry changes outside of a Onestop ID's geohash, automatically change the geohash
@doublestranded
Copy link
Contributor

doublestranded commented Dec 19, 2016

Questions:

  1. When to change OnestopId?
    A geohash change should trigger a change; name probably not.
  2. What should happen when changed
  3. How should it be renamed?
  4. How should old references be kept discarded?

@drewda
Copy link
Member Author

drewda commented Dec 19, 2016

actions available through changes on a changesets

to rename a Onestop ID:

"action": "changeOnestopId",
"existingOnestopID": "x-xxxx-old",
"newOnestopId": "x-xxxx-new"

to destroy an entity with a Onestop ID: same as existing destroy action

to merge 1 or more entities into a single Onestop ID:

"action": "merge",
"onestopIdsToMerge": ["x-xxx-1", "x-xxx-2", "x-xxx-3"],
"operator": {
  "onestopID": "x-xxx-3"
}

@doublestranded
Copy link
Contributor

doublestranded commented Dec 19, 2016

20161219_150613
20161219_150618

@doublestranded
Copy link
Contributor

doublestranded commented Feb 9, 2017

  • update the S3 filename to include only the sha1 hash and not the feed onestop id
  • remove renaming of S3 links on change onestop id

@doublestranded
Copy link
Contributor

doublestranded commented Feb 10, 2017

Note: a changeOnestopId action now requires two id fields: "newOnestopId" and "onestopId"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants