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

Can't migrate or save records with Based Near #158

Closed
1 task
jillpe opened this issue Oct 9, 2024 · 5 comments
Closed
1 task

Can't migrate or save records with Based Near #158

jillpe opened this issue Oct 9, 2024 · 5 comments
Assignees

Comments

@jillpe
Copy link

jillpe commented Oct 9, 2024

Summary

reference: notch8/adventist_knapsack#851

Lazy migrating (edit/save) a record with a based near property resulted in an error.

Acceptance Criteria

  • Devs should be able to convert records to valkyrie, with based_near properties set
@jillpe jillpe converted this from a draft issue Oct 9, 2024
@laritakr
Copy link
Contributor

laritakr commented Dec 2, 2024

Should be fixed by hyku updates: #164

@laritakr laritakr moved this from In Development to SoftServ QA in PalsKnapsack Dec 2, 2024
@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Jan 16, 2025

cc @laritakr Could you remind me how to unvalkyrize a record to test this? I recall needing to remove it from some table (orm_resources?), and...?

UPDATE: Valkyrie::Persistence::Postgres::ORM::Resource.where(id: )

@laritakr
Copy link
Contributor

laritakr commented Jan 16, 2025

What has worked for me is to remove it from Valkyrie::Persistence::Postgres::ORM::Resource table

There may be additional records (filesets, etc) beyond just the resource object.

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Jan 16, 2025

QA RESULTS: ✅ PASS

tested on STAGING

Testing Instruction

  • I found an old/active fedora work
  • confirmed it wasn't valkyrized by looking it up in rancher:
#<Etd id: "a63940ec-91d9-4fc0-92f5-a3bd72a710d6", head: [], tail: [], depositor: "[email protected]", title: ["Enhancing Culturally Competent Care in a Level III NICU: A Pilot Study"], date_uploaded: "2023-10-03 18:13:42", date_modified: "2023-10-03 18:13:42", state: #<ActiveTriples::Resource:0xce25c ID:<http://fedora.info/definitions/1/0/access/ObjState#inactive>>, proxy_depositor: nil, on_behalf_of: nil, arkivo_checksum: nil, owner: nil, is_child: nil, split_from_pdf_id: nil, show_pdf_viewer: "1", show_pdf_download_button: "1", video_embed: nil, advisor: ["Alison Nichols"], bulkrax_identifier: "demo-19-59", committee_member: [], degree_discipline: ["Occupational Therapy"], degree_grantor: ["University of Indianapolis"], degree_level: ["Doctorate"], degree_name: ["OTD"], department: ["School of Occupational Therapy"], format: [], additional_information: [], bibliographic_citation: [], admin_note: nil, date: "2021", alternative_title: [], label: nil, relative_path: nil, import_url: nil, resource_type: ["Capstone Project"], creator: ["Celia Heckert"], contributor: [], description: [], abstract: ["This study aims to identify the unique barriers to providing culturally competent care at IU Health North, analyze the benefits of a pilot module on cultural competence in the neonatal intensive care unit (NICU), increased pre-translated resources, and create a sustainability plan to expand the pilot module to other hospital departments. I completed a needs assessment to identify common barriers to meeting patients’ linguistic needs by interviewing 20 staff. The main barriers identified in the needs assessment were lack of awareness of available language services and the disconnect between the language and cultural barrier. Based on these results, NICU staff would benefit from simplified language service resources to increase staff’s comfort and confidence, as well as a module to educate staff on language services and cultural competence. Staff’s competence with language services and confidence with providing culturally competent care were assessed during the needs assessment and after they completed the module. Staff in the NICU demonstrated improvements in both competence with language services and confidence with providing culturally competent care. Collaboration with other team members ensured that this module would be expanded to other hospital departments and monitored for efficacy."], keyword: ["Occupational Therapy"], license: [], rights_notes: [], rights_statement: ["http://rightsstatements.org/vocab/InC/1.0/"], access_right: [], publisher: [], date_created: ["2021"], subject: [], language: [], identifier: [], based_near: [], related_url: [], source: [], access_control_id: "a7959841-9e89-4aee-ad90-0229430aee6e", representative_id: nil, thumbnail_id: nil, rendering_ids: [], admin_set_id: "admin_set/default", embargo_id: "cb8ec0cd-5967-469b-9e18-dafd8e1563e0", lease_id: "2137eebe-d323-4d07-a381-7ecd353a1ec8">

Valkyrie::Persistence::Postgres::ORM::Resource.where(id: etd.id) => [ ] 

I edited the work, added location: SAN DIEGO and confirmed it persisted.

Valkyrie::Persistence::Postgres::ORM::Resource.where(id: etd.id) => 

[#<Valkyrie::Persistence::Postgres::ORM::Resource:0x00007f93f1434d88
  id: "a63940ec-91d9-4fc0-92f5-a3bd72a710d6",
  metadata:
   {"date"=>["2021"],
    "state"=>[{"@id"=>"http://fedora.info/definitions/1/0/access/ObjState#inactive"}],
    "title"=>["Enhancing Culturally Competent Care in a Level III NICU: A Pilot Study"],
    "format"=>[],
    "source"=>[],
    "advisor"=>["Alison Nichols"],
    "creator"=>["0~Celia Heckert"],
    "keyword"=>["Occupational Therapy"],
    "license"=>[],
    "subject"=>[],
    "abstract"=>
     ["This study aims to identify the unique barriers to providing culturally competent care at IU Health North, analyze the benefits of a pilot module on cultural competence in the neonatal intensive care unit (NICU), increased pre-translated resources, and create a sustainability plan to expand the pilot module to other hospital departments. I completed a needs assessment to identify common barriers to meeting patients’ linguistic needs by interviewing 20 staff. The main barriers identified in the needs assessment were lack of awareness of available language services and the disconnect between the language and cultural barrier. Based on these results, NICU staff would benefit from simplified language service resources to increase staff’s comfort and confidence, as well as a module to educate staff on language services and cultural competence. Staff’s competence with language services and confidence with providing culturally competent care were assessed during the needs assessment and after they completed the module. Staff in the NICU demonstrated improvements in both competence with language services and confidence with providing culturally competent care. Collaboration with other team members ensured that this module would be expanded to other hospital departments and monitored for efficacy."],
    "language"=>[],
    "lease_id"=>[{"id"=>"2137eebe-d323-4d07-a381-7ecd353a1ec8"}],
    "depositor"=>["[email protected]"],
    "publisher"=>[],
    "admin_note"=>[""],
    "based_near"=>["https://sws.geonames.org/1850147/"],
    "department"=>["School of Occupational Therapy"],
    "embargo_id"=>[{"id"=>"cb8ec0cd-5967-469b-9e18-dafd8e1563e0"}],
    "identifier"=>[],
    "member_ids"=>[],
    "new_record"=>[false],
    "contributor"=>[],
    "degree_name"=>["OTD"],
    "description"=>[],
    "related_url"=>[],
    "video_embed"=>[""],
    "access_right"=>[],
    "admin_set_id"=>[{"id"=>"admin_set/default"}],
    "date_created"=>["2021"],
    "degree_level"=>["Doctorate"],
    "rights_notes"=>[],
    "alternate_ids"=>[{"id"=>"a63940ec-91d9-4fc0-92f5-a3bd72a710d6"}],
    "date_modified"=>["2025-01-16T20:04:08.300+00:00"],
    "date_uploaded"=>["2025-01-16T20:04:08.300+00:00"],
    "rendering_ids"=>[],
    "resource_type"=>["Capstone Project"],
    "degree_grantor"=>["University of Indianapolis"],
    "show_pdf_viewer"=>["1"],
    "committee_member"=>[],
    "rights_statement"=>["http://rightsstatements.org/vocab/InC/1.0/"],
    "alternative_title"=>[],
    "degree_discipline"=>["Occupational Therapy"],
    "bulkrax_identifier"=>["demo-19-59"],
    "additional_information"=>[],
    "bibliographic_citation"=>[],
    "member_of_collection_ids"=>[],
    "show_pdf_download_button"=>["1"]},
  created_at: Thu, 16 Jan 2025 20:03:28.476485000 UTC +00:00,
  updated_at: Thu, 16 Jan 2025 20:04:08.512712000 UTC +00:00,
  internal_resource: "Etd",
  lock_version: 0>]

Image

Then I edited the work to make sure it displayed correctly:

Image

Then I removed the SAN DIEGO location and updated it to TOKYO, and confirmed it persisted correctly:

Image

@ShanaLMoore
Copy link
Contributor

Closing without client review as this was a self reported issue.

@github-project-automation github-project-automation bot moved this from SoftServ QA to Done in PalsKnapsack Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants