scientist-softserv / hykuup_knapsack

container project for the Hyku Up deploy of Hyku
Apache License 2.0
1 stars 0 forks source link

Bulkrax: Import CollectionResources #161

Closed ShanaLMoore closed 3 months ago

ShanaLMoore commented 4 months ago

Summary

a user should be able to import collections via csv bulkrax.

image

Acceptance Criteria

Screenshots or Video

Error: NoMethodError - undefined method `admin_set_id' for #<CollectionResourceForm:0x0000ffff7216ee10 
Error Trace:

/usr/local/bundle/bundler/gems/hyrax-e525a8295ccc/lib/hyrax/transactions/steps/set_default_admin_set.rb:19:in `call'

/usr/local/bundle/bundler/gems/hyrax-e525a8295ccc/lib/hyrax/transactions/transaction.rb:99:in `block in call'

/usr/local/bundle/bundler/gems/hyrax-e525a8295ccc/lib/hyrax/transactions/transaction.rb:97:in `each'

/usr/local/bundle/bundler/gems/hyrax-e525a8295ccc/lib/hyrax/transactions/transaction.rb:97:in `inject'

/usr/local/bundle/bundler/gems/hyrax-e525a8295ccc/lib/hyrax/transactions/transaction.rb:97:in `call'

/usr/local/bundle/gems/dry-monads-1.6.0/lib/dry/monads/do.rb:131:in `block in call'

/usr/local/bundle/gems/dry-monads-1.6.0/lib/dry/monads/do/mixin.rb:40:in `call'

/usr/local/bundle/gems/dry-monads-1.6.0/lib/dry/monads/do.rb:131:in `call'

/app/samvera/hyrax-webapp/gems/bulkrax/app/factories/bulkrax/valkyrie_object_factory.rb:98:in `create'

/app/samvera/hyrax-webapp/gems/bulkrax/app/factories/bulkrax/object_factory.rb:92:in `block in run'

Tasks

Testing Instructions

Notes

Sample files: valkyrie-collection-only.csv

valkyrie-collection-filesets.zip

collection-works.csv

ShanaLMoore commented 4 months ago

TODOs: IMPORT

see tasks above add specs refactor

bulkrax branch WIP: i161-import-collection-resources is able to import/create collections && form relationships with works, but...

  1. unable to see the relationship to works from the UI (confirmed the relationships exists via console)- i think this is because of missing indexing values: https://github.com/samvera/hyrax/blob/double_combo/app/presenters/hyrax/collection_presenter.rb#L80-L111
  2. if you import "CollectionResource" as the model name instead of "Collection", it gets importered as a CsvEntry class instead of a collection entry

Image

  1. Re running importers with collections fail:
    Error: NoMethodError - undefined method `rendering_ids=' for #<CollectionResource id=#<Valkyrie::ID:0x0000ffff7add9f58 @id="54f2e38a-e19e-437b-a3a4-9c6f6ea93ad5"> 

Image

  1. Bulkrax UI missing translations show as false. + duplicate elements

Image

  1. off the above branch, I can no longer visit a work. this is a work that belongs to a collection.

Image

  1. unable to rerun importers w collections, without failures on the collection entry

Image

  1. Unable to import filesets